rInt :: String -> Int
rInt str = read str

getSortString :: Int -> Int -> String
getSortString a b
	| a <= b	= show a ++ " " ++ show b
	| otherwise	= show b ++ " " ++ show a

main :: IO ()
main = do
	input <- getLine
	let abList = map rInt $ words input
	let a = head abList
		b = last abList
	if a == 0 && b == 0
		then return ()
		else do	putStrLn $ getSortString a b
				main