now = 10**9 // 2
while True:
	print(now)
	r = int(input())
	if r:
		break
	now //= 2