import Data.Foldable (for_)
import Data.Functor ((<$>))

main = do
  xs <- takeWhile (/= [0, 0]) . map (map read) . map words . lines <$> getContents
  for_ xs $ \[x, y] -> let zs = if x <= y then [x, y] else [y, x] in putStrLn $ unwords $ map show zs

