object Main extends App{
  val List(a,b) = readLine.split(" ").map(_.toInt).toList
  val ab = (1 to b).map(x => a).mkString
  val ba = (1 to a).map(x => b).mkString
    
  val ans = if(ab <= ba) ab else ba
  println(ans)
}