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);
});
reader.on('close', () => {
  const lines_array = lines[0].split(" ").map(x => Number(x))
  var ary = []
  const first = String(lines_array[0]).repeat(lines_array[1])
  const second = String(lines_array[1]).repeat(lines_array[0])
  ary.push(first)
  ary.push(second)
  ary.sort()
  console.log(ary.shift())
});