"use strict"
 
function Main(s) {
  s = s.trim().split(' ');
  const a = s[0];
  const b = s[1];
  const aa = a.repeat(Number(b));
  const bb = b.repeat(Number(a));
  console.log(aa < bb ? aa:bb);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));