operator fun String.times(n:Int):String {
    var res:String = ""
    for (x in 1..n) {
        res += this
    }
    return res
}

fun main(args:Array<String>) {
    val (a,b) = readLine()!!.split(" ")
    var ls:MutableList<String> = mutableListOf(a * b.toInt(), b * a.toInt())
    ls.sort()
    println(ls[0])
}