toInt x = read x ::Int

main = do
  s <- getLine
  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 do
      putStrLn (show b ++ " " ++ show a)
    main