import Data.List
main =
  getContents >>=
    mapM_ putStrLn
    . map (unwords . map show . sort . map (read :: String -> Int) . words)
    -- . map ((\xs -> if xs!!0 < xs!!1 then xs!!0 ++ " " ++ xs!!1 else xs!!1 ++ " " ++ xs!!0) . words)
    . init . lines

