# -*- coding: utf-8 -*- import sys Klist = [0,0,0,0,0,0,0,0,0,0] print "".join(map(str, Klist)) sys.stdout.flush() tmp1, tmp2 = raw_input().split() tmp1 = int(tmp1) if tmp2 == "unlocked": exit() for i in range(0, 10): for j in range(0, 10): Klist[i] = j tmp3 = tmp1 print "".join(map(str, Klist)) sys.stdout.flush() tmp1, tmp2 = raw_input().split() tmp1 = int(tmp1) if tmp2 == "unlocked": exit() if tmp3 < tmp1: break Klist[i] = 0 if j != 9: tmp1 += 1