var input = function(){
  return input= require('fs').readFileSync('/dev/stdin', 'utf8').split("\n");
  };

var out = function(x)
{
  if (x == "0 0")
  {
    return x;
  }
  var array = x.split(" ").map(Number);

  if (array[0] < array[1])
  {
    console.log(array[0] + " " + array[1]);
  }
  else
  {
    console.log(array[1] + " " + array[0]);
  }


  return x;
}

var Arr=input()
.forEach(function(element)
{
  if (element != 0)
  {
    out(element);
  }
}
);