fun main(args: Array<String>) {
    val (A,B) = readLine()!!.split(" ")
    val a = A.repeat(B.toInt())
    val b = B.repeat(A.toInt())
    if(a < b){
        println(a)
    }else{
        println(b)
    }
}

