#include <iostream>

using namespace std;

const int MAXN = 80 + 10;
int a[MAXN];

int main () {
	int n;
	while (scanf ("%d", &n) != EOF){
		for (int i = 0; i < n; i++){
			scanf ("%d", &a[i]);
		}
		for (int i = 0; i < n; i++){
			if (i == 0){
				if (a[i + 1] != a[i]){
					cout << i << " ";
				}
			}else if (i == n - 1){
				if (a[i] != a[i - 1]){
					cout << i << " ";
				}
			}else if (a[i] > a[i - 1] && a[i] > a[i + 1] || a[i] < a[i - 1] && a[i] < a[i + 1]){
				cout << i << " ";
			}
		}
		cout << endl;
	}
	return 0;
}