import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val a = input.nextLong()
    val b = input.nextLong()
    
    var ab = 0L
    for (i in 1..b) {
      ab *= 10
      ab += a
    }
    
    var ba = 0L
    for (i in 1..a) {
      ba *= 10
      ba += b
    }
    
    println(Math.max(ab, ba))
    
  }
}