#include using namespace std; signed main(){ ios::sync_with_stdio( 0 ); vector< int > match( 10 ); for( int i = 0; i < 10; ++i ){ string s; for( int j = 0; j < 10; ++j ) s += ( char ) ( '0' + i ); cout << s << endl; string reply; cin >> match[ i ] >> reply; if( match[ i ] == 10 ) exit( 0 ); } string s; for( int i = 0; i < 10; ++i ) for( int j = 0; j < match[ i ]; ++j ) s += ( char ) ( '0' + i ); cout << "1234567890" << endl; int a; string b; cin >> a >> b; if( a == 10 ) exit( 0 ); do{ cout << s << endl; int m; string reply; cin >> m >> reply; if( reply == "unlocked" ) break; } while( next_permutation( s.begin(), s.end() ) ); return 0; }