#include using namespace std; #define int long long signed main(){ int ans = 0; for( int i = ( int ) 1e9; i; i /= 10 ){ vector< int > match( 10 ); for( int j = 0; j < 10; ++j ){ cout << setw( 10 ) << setfill( '0' ) << j * i << endl; int m; string r; cin >> m >> r; if( r == "unlocked" ) exit( 0 ); match[ j ] = m; } ans = ans * 10 + max_element( match.begin(), match.end() ) - match.begin(); } cout << setw( 10 ) << setfill( '0' ) << ans << endl; int m; string r; cin >> m >> r; return 0; }