import Control.Applicative

main :: IO ()
main = do
  xs <- (map read . words) <$> getLine
  if (xs !! 0) == 0 && (xs !! 1) == 0 then return ()
    else do
    {
      putStrLn $ (solve (xs !! 0) (xs !! 1));
      main
    }
         
solve :: Int -> Int -> String
solve x y
  | x < y = show x ++ " " ++ show y
  | otherwise = show y ++ " " ++ show x