#include <cstdio>
using namespace std;
int main(){
    int arr[90];
    int n,x;
    while (scanf("%d",&n)!=EOF){
        for(int i=0;i<n;i++){
            scanf("%d",&arr[i]);
        }
        for(int i=0;i<n;i++){
            if(arr[i]>arr[i+1]&&arr[i]>arr[i-1]&&i+1<=n){
                x=i;
                printf("%d ",x);
            } else if(arr[i]<arr[i+1]&&arr[i]<arr[i-1]&&i+1<=n){
                x=i;
                printf("%d ",x);
            } else if(i-1<0){
                if(arr[i]>arr[i+1]){
                    x=i;
                    printf("%d ",x);
                } else if(arr[i]<arr[i+1]){
                    x=i;
                    printf("%d ",x);
                }
            } else if(i+1>=n){
                if(arr[i]>arr[i-1]){
                    x=i;
                    printf("%d ",x);
                } else if(arr[i]<arr[i-1]){
                    x=i;
                    printf("%d ",x);
                }
            }
        }
        printf("\n");
    };

}