

import java.util.Scanner

object Main extends App {

  val sc = new Scanner(System.in)
  val a = sc.nextInt()
  val b = sc.nextInt()

  private val res: String = if (a > b) {
    Seq.fill(a)(b.toString).reduce(_ ++ _)
  } else {
    Seq.fill(b)(a.toString).reduce(_ ++ _)
  }
    println(res)

}

