import           Data.Bits
main=readLn>>=mapM_ print.f
f :: Int -> [Int]
f 1=[1]
f 2=[2]
f 3=[1,2]
f 4=[1,3]
f 5=[2,3]
f 6=[1,2,3]
f 7=[1,2,4]
f 8=[1,3,4]
f 9=[2,3,4]
f 10=[2,3,5]
f n|q<-div(n+1)2=f(n-q)++[q]