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

main = solve

