a, b = input().split()

atxt = ''.join([a for _ in range(int(b))])

btxt = ''.join([b for _ in range(int(a))])



if atxt <= btxt:

    print(atxt)

else:

    print(btxt)

    

a, b = input().split()

atxt, btxt = "", ""

for i in range(int(b)):

  atxt += a

for i in range(int(a)):

  btxt += b

if atxt <= btxt:

  print(atxt)

else:

  print(btxt)

a, b = input().split()
atxt = "".join([a for _ in range(int(b))])
btxt = "".join([b for _ in range(int(a))])
if atxt <= btxt:
    print(atxt)
else:
    print(btxt)

a, b = input().split()
atxt, btxt = "", ""
for i in range(int(b)):
    atxt += a
for i in range(int(a)):
    btxt += b
if atxt <= btxt:
    print(atxt)
else:
    print(btxt)

-atxt = "".join([a for _ in range(int(b))]) -btxt = "".join([b for _ in range(int(a))]) +atxt, btxt = "", "" +for i in range(int(b)): +    atxt += a +for i in range(int(a)): +    btxt += b