a,b = input().split()

if a > b:

    tmp = a

    a = b

    b = tmp

for i in range(int(b)):

    print(a,end='')

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

if a < b:

    for i in range(b):

        print(a,end = '')

else:

    for i in range(a):

        print(b,end = '')

a, b = input().split()
if a > b:
    tmp = a
    a = b
    b = tmp
for i in range(int(b)):
    print(a, end="")

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

-a, b = input().split() -if a > b: -    tmp = a -    a = b -    b = tmp -for i in range(int(b)): -    print(a, end="") +a, b = map(int, input().split()) +if a < b: +    for i in range(b): +        print(a, end="") +else: +    for i in range(a): +        print(b, end="")