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
        putStrLn $ getSorted [x,y]

getSorted :: [Int] -> String
getSorted [x,y]
          | x < y = printf "%d %d\n" x y
          | x > y = printf "%d %d\n" y x