#include using namespace std; int main() { int n,arr[20000],i,j,k,steps=0,a,b,c,d,e,mn,pos; while(cin>>n) { steps=0,mn=1e9,pos=0; for(i=0; i>arr[i]; while(1) { pos=-1; mn=1e9; for(i=0; i