a,b = list(map(int,input().split()))

a_l = ""

b_l = ""

for i in range(b):

  a_l += str(a)

for j in range(a):

  b_l += str(b)

if a>b:

  print(b_l)

elif b<a:

  print(a_l)

else:

  print(a_l)
a,b = list(map(int,input().split()))

k = str(a)

l = str(b)

X = k*b

Y = l*a

if (X < Y):

  print(X)

else:

  print(Y)
a, b = list(map(int, input().split()))
a_l = ""
b_l = ""
for i in range(b):
    a_l += str(a)
for j in range(a):
    b_l += str(b)
if a > b:
    print(b_l)
elif b < a:
    print(a_l)
else:
    print(a_l)

a, b = list(map(int, input().split()))
k = str(a)
l = str(b)
X = k * b
Y = l * a
if X < Y:
    print(X)
else:
    print(Y)

-a_l = "" -b_l = "" -for i in range(b): -    a_l += str(a) -for j in range(a): -    b_l += str(b) -if a > b: -    print(b_l) -elif b < a: -    print(a_l) +k = str(a) +l = str(b) +X = k * b +Y = l * a +if X < Y: +    print(X) -    print(a_l) +    print(Y)