#include using namespace std; typedef long long ll; typedef vector VI; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) #define in(T,V) T V;cin>>V; const int MOD = int(1e9+7); int check(int n[10]){ string s; REP(i,10){ if(n[i] < 0) s += "-"; else s += char('0' + n[i]); } cout << s << endl; getline(cin, s); stringstream ss(s); int v; ss >> v; return v; } int main(){ int n[10],b[10]; REP(i,10){ REP(j,10) n[j] = i; b[i] = check(n); if(b[i] == 10) return 0; } REP(i,10) n[i] = -1; int r = 0; REP(i,10){ REP(j,10){ if(b[j] == 0) continue; n[i] = j; int v = check(n); if(r < v){ r = v; b[j]--; break; } } } }