char buf[5*1002]; main(){ int n; scanf("%d",&n); sprintf(buf,"? "); for(int i=1;i<=n;++i){ sprintf(buf+5*(i+1),"%4d ",i); } int m=n; for(int i=1;i<=n&&m>2;++i){ char saved[5]; memcpy(saved,buf+5*(i+1),5); memset(buf+5*(i+1),32,5); --m; sprintf(buf+5,"%4d",m); buf[9]=32; write(1,buf,5*(n+2)); int r; scanf("%d",&r); if(!r){ ++m; memcpy(buf+5*(i+1),saved,5); } } { buf[0]='!'; sprintf(buf+5,"%4d",m); buf[9]=32; write(1,buf,5*(n+2)); } }