#include <iostream> using namespace std; int main() { int k; while (cin >> k) { int jz[k]; for(int i=0;i<k;i++) { cin>>jz[i]; } for(int i=0;i<k;i++) { if(i==0) { if(jz[0]<jz[1]||jz[0]>jz[1]) { cout<<i<<" "; } } else if(i==(k-1)) { if(jz[i]<jz[i-1]||jz[i]>jz[i-1]) { cout<<i<<" "; } } else{ if(((jz[i]<jz[i-1])&&(jz[i]<jz[i+1]))||((jz[i]>jz[i-1])&&(jz[i]>jz[i+1]))) { cout<<i<<" "; } } } cout<<endl; } }