let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

let a = arr[0]
let b = arr[1]

var ans: String = ""
var r: String
var n: Int

if (a < b) {
  r = String(a)
  n = b
} else {
  r = String(b)
  n = a
}

var i = 0
for i in 0..<n {
  ans = ans + r
}

print(ans)