fun main(args: Array<String>) {
    val (a, b) = readLine()!!.split(" ").map { it.toInt() }
    val s1 = Array(a, {b.toString()}).joinToString("")
    val s2 = Array(b, {a.toString()}).joinToString("")
    println(if (s1 < s2) s1 else s2)
}