fun main(args: Array<String>) {
    abc152b()
}

fun abc152b() {
    val (a, b) = readLine()!!.split(' ')

    val answer = listOf(a.repeat(b.toInt()), b.repeat(a.toInt())).sorted().first()

    println(answer)
}
