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