function main(input) {
    let line = input.split(/\r?\n/g);
    let arr = line[0].split(" ");
    const a = parseInt(arr[0]), b = parseInt(arr[1]);
    let an = "";
    let bn = "";
    for (let i = 0; i < b; i++)
        an += a;
    for (let i = 0; i < a; i++)
        bn += b
    console.log(an < bn ? an : bn)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
