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