function main(input) {
  const inputs =input.split('\n')
  const [a, b] = inputs[0].split(' ').map(Number)
  if (a > b) {
    console.log(Array.from(new Array(a)).map(e => b).join(''))
  } else {
    console.log(Array.from(new Array(b)).map(e => a).join(''))
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim())
