from itertools import takewhile [print(str(i).zfill(3)) for i in takewhile(lambda i: input() == "locked", range(1000))]