import Control.Monad
import Control.Applicative
import Data.Functor
import Data.List
import Data.List.Split
import Data.Char
import Data.Ord
import Data.Array.IO

readInt = read :: String -> Int
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
-- end of templete

f x = f' 1 x
  where
    f' _ 0 = []
    f' t r = if mod r nt /= 0 then (t : f' nt (r-t)) else f' nt r
      where
        nt = t * 2

main = map readInt . lines <$> getContents >>= mapM_ (putStrLn . sjoin . f)