open Printf
open Str

let inputs string =
	let l_of_str = Str.split (Str.regexp " ") string in
	let nums = Array.of_list (List.map int_of_string l_of_str) in
	Array.sort(compare) nums;
	printf "%d %d\n" nums.(0) nums.(1);;

let isEnd = ref false in
while not !isEnd do
	let s = read_line() in
		if "0 0" = s then
			isEnd := true
		else
			inputs s
done;;