class SwapNumber
	def swap(input)
		result = Array.new
		input.each do |val|
			result << val.sort
		end
		result.each do |val|
			puts "#{val[0]} #{val[1]}"
		end
	end
end

array = Array.new

while line = gets
	array << line.split.map(&:to_i)
	break if (array[-1][0] == 0 && array[-1][1] == 0)
end

array.delete_at(-1) ## [0,0]要素を消す

SwapNumber.new.swap(array)