import           Data.Bits

solve :: Int -> [Int]
solve x = let bits = filter (testBit x) [0..9] in map (2^) bits

main :: IO ()
main = getContents >>= mapM_ (printResult . solve . read) . lines
  where printResult = putStrLn . unwords . map show