def array_integer(a)
	0.upto(a.count) {|x|
		a[x] = a[x].to_i
	}
	return a
end

eof = false
while !eof
	a,b = array_integer(STDIN.gets.split(" "))
	if a == 0 and b == 0 then
		eof = true
		break
	elsif a > b then
		print b , " ", a, "\n"
	else
		print a , " ", b, "\n"
	end
end

