def query(s): print(s) lock = input() if lock == "unlocked": exit() return for i in range(10): for j in range(10): for k in range(10): query(str(i)+str(j)+str(k))