char s[9999];t,k;main(){for(*s=48;k<10;t<(k&=4111)&&(s[t=k]=48)||s[t]++)puts(s),fflush(0),gets(&k);}