N = 10**9 for x in range(30): N //= 2 print(N, flush=True) result = int(input()) if result == 1 or result == -1: break