from math import* k=int(input()) for o in range(30,1,-1): j=o*(o-1)//2 if k%j>0:continue z=log2(k//j) if z%1<1: print(*([0]*int(z)+[1]*o)) break