from itertools import permutations from math import factorial c = lambda y, x: factorial(y) // factorial(x) // factorial(y - x) def solve(): k = int(input()) if k == 0: return [0] if k == 1: return [1, 1] for i in range(0, 30): for j in range(2, 30): if (1 << i) * c(j, 2) == k: return [0] * i + [1] * j return [0] print(*solve())