loop do                                                                                                                                
  array = gets.split.map(&:to_i)                                                                                                       
  break if array == [0, 0]                                                                                                             
  puts "#{array.sort[0]} #{array.sort[1]}"                                                                                             
end