import Text.Printf
main :: IO()
main = do
  doLines

doLines :: IO()
doLines = do
  input <- getLine
  let [x,y] = map (\i -> read i :: Int) $ words input
  if [x,y] == [0,0]
  then
      return()
  else do
      putStrLn $ mySort x y
      doLines

mySort :: Int -> Int -> String
mySort x y
    | x <= y = printf "%d %d" x y
    | x >  y = printf "%d %d" y x