#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
      
if __FILE__ == $0
  while line = STDIN.gets
    tokens = line.chomp!.split.map!(&:to_i)
    x, y = tokens[0], tokens[1]
    break if x == 0 && y == 0

    if x > y
      x, y = y, x
    end

    puts "#{x} #{y}"
  end
end