M = 30 x = 10**9 for i in range(M): print(x) r = int(input()) if r == 1: break elif r == 0: x //= 2 else: break