for i in range(9): for j in range(9): for k in range(9): print "".join(map(str,[i,j,k])) sys.stdout.flush() if (raw_input() == "unlocked"): exit()