inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(' ')
a = l.shift() * 1
b = l.shift() * 1 
as = a + ''
bs = b + ''
for (i=0;i<b-1;i++) {
    as += a 
}
for (i=0;i<a-1;i++) {
    bs += b
}
console.log(as < bs ? as : bs)