function Main(input) {
  input = input.split(" ");
  a = input[0];
  b = input[1];
  ab = '';
  ba = '';
  for (i = 0; i < a; ++i) {
    ab += b;
  }
  for (i = 0; i < b; ++i) {
    ba += a;
  }
  ar = [ab, ba];
  ar.sort();
  console.log(ar[0]);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));