"use strict"
function main(arg) {
    var data = arg.trim().split("\n")[0].split(" ").map(Number)
    var a = data[0]
    var b = data[1]
    var a_s=""
    var b_s=""
    for (var i = 0; i < a; i++) {
        b_s += b
    }
    for (var i = 0; i < b; i++) {
        a_s += a
    }
    var ans = [a_s, b_s].sort()
    console.log(ans[0])
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));