process.stdin.resume();
process.stdin.setEncoding('utf8');
 
var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    // ここで入力を処理する
    lines.push(line);
});
var sub_fn = (ary)=>{
  
}
reader.on('close', () => {
  var x = lines[0].split(' ')[0]
  var y = lines[0].split(' ')[1]
  var xx = "";
  var yy = "";
  for(var i=0;i<y;i++){
    xx += x
  }
    for(var j=0;j<x;j++){
    yy += y
  }
  //console.log(yy)
  if(("" + xx) < ("" + yy)){
    console.log(xx)
  }else{    
    console.log(yy)
  }
  var cnt = [];


  
});
