function main(arg) {
	arg = arg.trim().split(/\n/);
  	var a = parseInt(arg[0].split(' ')[0]), b = parseInt(arg[0].split(' ')[1]),
        aa = '', bb = '', out;
  	for (var i = 0; i < b; i++) {
    	aa += a;
    }
  	for (var i = 0; i < a; i++) {
    	bb += b;
    }
	out = [aa, bb].sort();
  	console.log(out[0]);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));