N = int(input()) ans = [] cur = 1 while cur <= N: ans.append(cur) cur *= 2 print(*ans)