x=(10**9)//2

while True:
    print(x,flush=True)
    r=int(input())
    if r==1:
        break
    else:
        x=(x+1)//2