import Data.List
import Text.Printf

ans:: [Int] -> [Int]
ans x = sort x

main = do
    c <- getContents
    let i = map words $ lines c :: [[String]]
        j = map (map read) i :: [[Int]]
        k = takeWhile (/= [0,0]) j
        o = map ans k
    mapM_ (\x -> printf "%d %d\n" (x!!0) (x!!1)) o
    