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