i = 0 while True: print("%03d"%i, flush=True) res = input() if res == "locked": i += 1 elif res == "unlocked": break else: print("error occured!")