import Control.Applicative
import Control.Monad

main :: IO ()
main = do
  cs <- lines <$> getContents
  forM_ cs $ \w -> putStrLn $ unwords $ reverse $ map show $ weigh (read w)

weigh :: Int -> [Int]
weigh w = f w a
  where
    f :: Int -> Int -> [Int]
    f w v
      | w == 0    = []
      | w >= v    = v : f (w-v) v
      | otherwise = f w (v`div`2)

    a = until (>=w) (*2) 1 