# Your code here!
while line = gets
    a, b = line.split(" ").map(&:to_i)
    
    if a < b
        puts "#{a} #{b}"
    elsif a > b
        puts "#{b} #{a}"
    else
        puts "#{a} #{b}"
    end
        
    break if a == 0 && b == 0
end