module Main where

    import Debug.Trace

    readLine:: IO [Int]
    readLine = fmap (map read . words) getLine
    
    while :: Int -> Int -> IO ()
    while x y = if not (x==0 && y== 0) 
        then do
            putStrLn $ if x <=y then (show x ++" "++ show y) else (show y ++" "++ show x)    
            [x', y']    <- readLine
            while x' y'
        else return ()

    main :: IO() 
    main = do
        let i = 1
        [x, y]    <- readLine
        while x y
    
