while x = gets.split()
  a = x[0].to_i
  b = x[1].to_i
  if a == 0 && b == 0
    break
  end
  if a > b
    puts "#{b}"+" "+"#{a}"
  elsif a == b
    puts "#{a}"+" "+"#{b}"
  else
    puts "#{a}"+" "+"#{b}"
  end
end