import Data.List
main = do
  str<-getLine
  let [x,y]=poyo$map read $ words str
  if (x==0 && y==0)
    then return ()
    else do
      putStrLn $ (show x)++" "++(show y)
      main
poyo::[Int]->[Int]
poyo [x,y]
  | x<y = [x,y]
  |otherwise = [y,x]