def main(): n = -1 s = 'locked' while s == 'locked': print(str(n+1).zfill(3), flush=True) s = input() main()