x=10**9 while 1: print(x,flush=1) r=int(input()) if r==1: exit() else: x//=2