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