import sys pin = list('0000000000') print(''.join(pin)) sys.stdout.flush() match, locked = input().split() match = int(match) if locked == 'unlocked': exit() for i in range(10): for j in range(1, 10): pin[i] = str(j) print(''.join(pin)) sys.stdout.flush() m, result = input().split() if result == 'unlocked': exit() if match < int(m): match = int(m) break elif match > int(m): pin[i] = str(0) break else: pin[i] = str(0)