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