for i in range(999): print(str(i).zfill(3)) if input() == 'locked': continue else: break