n = int(input())
bn = bin(n)[2:]
if len(bn) <= 7:
    print(n)
else:
    ans = []
    ost = bn[len(bn) - 7:]
    bn = bn[:len(bn) - 7]
    ans.append(int(ost, 2))
    while True:
        if len(bn) <= 7:
            ans.append(int("1" + bn.zfill(7), 2))
            break
        ost = bn[len(bn) - 7:]
        bn = bn[:len(bn) - 7]
        ans.append(int("1" + ost, 2))
    ans2 = []
    for i in range(len(ans) - 1, -1, -1):
        ans2.append(ans[i])
    print(" ".join(map(str, ans2)))