for i in range(30)[::-1]: print(1 << i) r = int(input()) if r == 1: break