main =
  let 
    func = do
      line <- getLine
      let 
        swap [a,b]
          | a > b     = [b,a]
          | otherwise = [a,b]
        [a,b] = swap $ map read $ words line :: [Int]
        in
          if [a,b] == [0,0] 
            then putStr ""
            else do
              putStrLn $ (show a) ++ " " ++ (show b)
              func
    in func

