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