import Control.Monad
import Control.Applicative
import Data.List

main = do
  xs <- input read :: IO [Int]
  mapM_ putStrLn $ solve xs

solve :: [Int] -> [String]
solve xs = map f xs
  where f z = intercalate " " . filter (not . null) $ zipWith (\x y -> if x == 1 then y else "") (i2b z) tbl

i2b :: Int -> [Int]
i2b 0 = []
i2b x = x `mod` 2 : i2b (x `div` 2)

tbl :: [String]
tbl = ["1", "2", "4", "8", "16", "32", "64", "128", "256", "512"]


input :: (String -> a) -> IO [a]
input f = map f . lines <$> getContents 