#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) //------------------------------------------------------- int Q; string S[100]; string T[100]; string R[100]; vector ask() { int i; Q--; vector V(3); FOR(i,100) { cout<>V[0]>>V[1]>>V[2]; } if(V[2]==100) exit(0); return V; } void solve(int num,int L,int R,vector& V,int tot) { if(tot==0) return; while(L& V,int n10,int num) { int L=0,R=V.size(); int i; while(L+2>Q; FOR(i,100) S[i]=T[i]="??"; /* FOR(i,100) { R[i]=to_string(i); if(R[i].size()==1) R[i]="0"+R[i]; } srand(time(NULL)); random_shuffle(R,R+100); */ FOR(j,10) { vector V; FOR(i,100) if(T[i][0]=='?') V.push_back(i); solve(j,0,V.size(),V,10); } FOR(j,100) if(T[j][0]=='?') T[j][0]='9'; FOR(i,10) { vector V; FOR(j,100) if(T[j][0]=='0'+i) V.push_back(j); FOR(j,10) solve2(V,i,j); } FOR(i,100) S[i]=T[i]; ask(); } int main(int argc,char** argv){ string s;int i; if(argc==1) ios::sync_with_stdio(false), cin.tie(0); FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin); cout.tie(0); solve(); return 0; }