xysort (x:y:_)
  | x < y = [x,y]
  | otherwise = [y,x]

ft [] = []
ft [x] = show(x)
ft (x:xs) = show (x) ++ " " ++ ft xs

main = do
  xy <- getLine
  if xy == "0 0"
    then
      return []
    else do
      let ss = map (read :: String -> Int) $ words xy
      putStrLn $ ft $ xysort ss
      main