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