import System.IO (isEOF)

main = do
    quit <- isEOF
    if quit then return () else do
        input >>= return . weights >>= output
        main

input :: IO Int
input = readLn

output :: [Int] -> IO ()
output = putStrLn . unwords . map show

weights :: Int -> [Int]
weights w = weights' w 1
    where
    weights' 0 _ = []
    weights' w' s
        | odd w' = s : weights' (w' `div` 2) (s * 2)
        | otherwise = weights' (w' `div` 2) (s * 2)