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