qSort :: (Ord a) => [a] -> [a]
qSort xs = case xs of [] -> []
                      (h:ts) -> (qSort smallerOrEqual) ++ [h] ++ (qSort larger)
                        where smallerOrEqual = [ a | a <- ts, a <= h ]
                              larger = [ a | a <- ts, a > h]

stringToInt :: String -> [Int]
stringToInt xs = map read $ words xs

printf :: (Show a) => [a] -> IO ()
printf xs = putStrLn $ unwords $ map show xs

main = do
  hoge <- getLine
  printf $ qSort $ stringToInt hoge

