input = []
loop do
  input.push(gets.split(' ').map(&:to_i))
  if input[-1][0] == 0 && input[-1][1] == 0
    input.pop
    break
  end
end

input.length.times do |i|
  x = input[i][0]
  y = input[i][1]
  if x > y
    puts '%d %d' % [y, x]
  else
    puts '%d %d' % [x, y]
  end
end