main = readAndDo

readAndDo = do
  line <- getLine
  if line == "0 0" then return ()
  else do
    let [a, b] = map (read :: String -> Int) $ words line
    let s | a <= b = fmt [a, b]
          | otherwise = fmt [b, a]
    putStrLn s
    readAndDo
    where fmt = unwords . map show

