#include <iostream>
using namespace std;
const int N = 81;
int a[N];
int main() {
    int n;
    while (cin >> n) {
        for(int i = 0; i < n; i ++) cin >> a[i];
        if(a[0] != a[1]) cout << 0 << " ";
        for(int i = 1; i < n - 1; i ++){
            if ((a[i]-a[i-1])*(a[i]-a[i+1]) > 0) cout << i << " ";
        }
        if(a[n-1] != a[n-2]) cout << n-1;
        cout << endl;
    }
    return 0;
}