var readable = process.stdin;
readable.resume();
readable.setEncoding( 'utf-8' );
readable.on( 'data', function( chunk ) {
  var data = chunk.replace( /\n/, '' ).split( ' ' );
  var a = parseInt( data[0] );
  var b = parseInt( data[1] );

 
  if( b < a ) {
    var t = a;
    a = b;
    b = t;
  }
  if( 0 != a || 0 !=  b ) {  
    console.log( '%d %d', a, b );
  }
});