main = do
  s <- getLine
  let toInt x = read x :: Int
  let sort a b = putStrLn $ if a < b then (show a) ++ " " ++ (show b) else (show b) ++ " " ++ (show a)
  let [a,b] = map toInt . words $ s
  if (a,b) == (0,0) then return ()
  else do
    sort a b
    main