class Main
  def self.run
    data_set = read_inputs
    data_set.map{|xy| xy.sort.join(" ")}.each{|answer| puts answer}
  end

  private

  def self.read_inputs
    data_set = []
    while true do
      xy = gets.split(" ").map(&:to_i)
      case xy
        when [0, 0] then break
        else data_set << xy
      end
    end
    data_set
  end
end

Main.run