x, y = map(int, input().split())

if(x < y):

    for i in range(0, y):

        print(x, end = '')

else:

    for i in range(0, x):

        print(y, end = '')









a = [int(i) for i in input().split()]

if (a[0] <= a[1]):

  print((str(a[0])*a[1]))

elif (a[1] < a[0]):

  print((str(a[1])*a[0]))

x, y = map(int, input().split())
if x < y:
    for i in range(0, y):
        print(x, end="")
else:
    for i in range(0, x):
        print(y, end="")

a = [int(i) for i in input().split()]
if a[0] <= a[1]:
    print((str(a[0]) * a[1]))
elif a[1] < a[0]:
    print((str(a[1]) * a[0]))

-x, y = map(int, input().split()) -if x < y: -    for i in range(0, y): -        print(x, end="") -else: -    for i in range(0, x): -        print(y, end="") +a = [int(i) for i in input().split()] +if a[0] <= a[1]: +    print((str(a[0]) * a[1])) +elif a[1] < a[0]: +    print((str(a[1]) * a[0]))