main = do
    line <- getLine
    let [x, y] = map (\n -> read n :: Int) $ words line
    if x == 0 && y == 0 then
        return ()
    else do
        putNums x y
        main

putNums :: Int -> Int -> IO ()
putNums x y
  | x <= y    = putStrLn $ (show x) ++ " " ++ (show y)
  | otherwise = putStrLn $ (show y) ++ " " ++ (show x)
