def sorts(*arr)
	arr.each do |i|
		i.each do |j|
			x = j[0]
			y = j[1]
			if (x < y)
				puts sprintf("%d %d", x, y)
			else
				puts sprintf("%d %d", y, x)
			end
		end
	end
end

input_arr = []
while input = gets
	x, y = input.split(' ').map(&:to_i)
	break if (x == 0 && y == 0)
	arr = [x, y]
	input_arr << arr
end

sorts(input_arr)