import Data.List.Split

main = do
  ns <- getNums
  let sorted = quickSort ns
  printList sorted

printList [] = putStrLn ""
printList (x:[]) = putStrLn $ show x
printList (x:xs) = putStrLn (show (x) ++ "") >> printList xs

quickSort :: Ord a => [a] -> [a]
quickSort [] = []
quickSort (c:as) = quickSort smaller ++ c : quickSort bigger
  where
    smaller = [a | a <- as, a <  c]
    bigger  = [a | a <- as, a >= c]

getNums :: IO ([Int])
getNums = do
  s <- getLine
  return $ map read $ splitOn " " s

