M=30 x = 10**9 for i in range(M): print(x, flush=True) r = int(input()) if r == 1: exit() elif r == 0: x //= 2