import java.util.*

fun main(args:Array<String>){
    val (n,m) = readLine()!!.split(" ").map{it.toInt()}
    if(n >= m){
        repeat(n){
            print(m)
        }
        println()
    }
    else{
        repeat(m){
            print(n)
        }
        println()
    }
}
