{-# LANGUAGE ScopedTypeVariables #-}

import           Control.Applicative
import           Data.Functor
import           Text.Printf

main :: IO ()
main = do
  [x,y] :: [Int] <- fmap read . words <$> getLine
  if x == 0 && y == 0
    then pure ()
    else do
    if x > y
      then printf "%d %d\n" y x
      else printf "%d %d\n" x y
    main

