import java.util.*
import java.util.ArrayDeque

fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val a = sc.nextInt()
    val b = sc.nextInt()

    val ab = a.toString().repeat(b)
    val ba = b.toString().repeat(a)

    print(if (ab < ba) ab else ba)
}
