#!/usr/bin/env ruby

numbers = []
strings = []
index = 0

loop do
    string = gets
    strings = string.split.map(&:to_i)
    if strings[0] == 0 and strings[1] == 0 then
        break
    end
    numbers[index] = strings[0]
    numbers[index + 1] = strings[1]
    index += 2
end


(index / 2).times do |i|
    if numbers[2 * i] < numbers[2 * i +1] then
        puts ("#{numbers[2 * i]} #{numbers[2 * i + 1]}")
    else
        puts ("#{numbers[2 * i + 1]} #{numbers[2 * i]}")
    end
end


