#include<cstdio> int main(){ int n; int arr[100]; while(scanf("%d",&n) != EOF){ for(int i = 0 ; i < n ; ++ i){ scanf("%d",&arr[i]); } if(arr[0] != arr[1]){ printf("%d ",0); } for(int i = 1; i < n-1 ; ++ i){ if(arr[i]> arr[i+1] && arr[i]> arr[i-1] || arr[i]< arr[i+1] && arr[i]< arr[i-1]){ printf("%d ",i); } } if(arr[n] != arr[n-1]){ printf("%d",n-1); } } }