Problem:
 Score : 200 points    Problem Statement Given are 1 -digit positive integers a and b . Consider these two strings: the concatenation of b copies of the digit a , and the concatenation of a copies of the digit b . Which of these is lexicographically smaller?      Constraints  1 \leq a \leq 9  1 \leq b \leq 9  a and b are integers.         Input Input is given from Standard Input in the following format:  a  b       Output Print the lexicographically smaller of the two strings. (If the two strings are equal, print one of them.)        Sample Input 1 4 3      Sample Output 1 3333  We have two strings 444 and 3333 . Between them, 3333 is the lexicographically smaller.       Sample Input 2 7 7      Sample Output 2 7777777

Solution (Python):
a,b=map(int,input().split())
l=[[1,1],[2,11],[3,111],[4,1111],[5,11111],[6,111111],[7,1111111],[8,11111111],[9,111111111]]

c=0
d=0

for i in range(9):
    if l[i][0]==a:
        c=b*l[i][1]
    if l[i][0]==b:
        d=a*l[i][1]
if a>b:
    print(c)
else:
    print(d)

Solution (Python):
a,b = input().split()
n = a*int(b)
m = b*int(a)
l = [n,m]
l.sort()

print(l[0])

Solution (Python):
nums = input().split()

A=int(nums[0])
B=int(nums[1])

if (A>=B):
    print(str(B)*A)
else:
    print(str(A)*B)

Solution (Python):
a,b=input().split(" ")
a=int(a)
b=int(b)
 
a_str=""
b_str=""
for i in range(a):
  b_str=b_str+str(b)
for i in range(b):
  a_str=a_str+str(a)
if int(a_str[0]) > int(b_str[0]):
  print(b_str)
elif int(a_str[0]) < int(b_str[0]):
  print(a_str)
else:
  print(a_str)

Solution (Python):
i = list(map(int, input().split()))

i.sort()


for j in range(i[1]):
  print(i[0],end="")

Solution (Python):
a, b = map(int, input().split())
if a >= b:
    print(str(b) * a)
else:
    print(str(a) * b)

Solution (Python):
n,m=map(int,input().split())
print(min(str(n)*m,str(m)*n))

Solution (Python):
a = list(map(int,input().split()))
b = a[0] - a[1]
if b == 0 :
	print(str(a[0]) * a[0])
else : print(str(min(a[0], a[1])) * max(a[0], a[1]))

Solution (Python):

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

if a <= b:
    for i in range(0, b):
        print(a, end="")
else:
    for i in range(0, a):
        print(b, end="")

Solution (Python):
a, b = [int(v) for v in input().split()]

a_s = str(a)
for i in range(1, b):
    a_s += str(a)

b_s = str(b)
for i in range(1, a):
    b_s += str(b)

if a_s > b_s:
    print(b_s)
else:
    print(a_s)

Solution (Python):
nums = input().split()

if (nums[0].isdigit()==True) and (nums[1].isdigit()==True):
    a=int(nums[0])
    b=int(nums[1]) 
    if (1<=a) and (a<=9) and (1<=b) and (b<=9) :
        if a<=b:
            n_min=a
            n_max=b
        else:
            n_min=b
            n_max=a
        l=str(n_min)*n_max
        print(l)

Solution (Python):
S = list(map(int,input().split()))
a = S[0]
b = S[1]
if a == b:
  for i in range(int(a)):
    print(a,end="")
elif a > b:
  for i in range(int(a)):
    print(b,end="")
else:
  for i in range(int(b)):
    print(a,end="")

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

aa = ''
bb = ''
for i in range(a):
	bb += str(b)

for i in range(b):
	aa += str(a)


if aa > bb:
	print(bb)
else:
	print(aa)

Solution (Python):
m,n=map(int,input().split())
a=b=""
if m!=n :
    for i in range(m) :
        a=a+str(n)
    for i in range(n) :
        b=b+str(m)
    if len(a)>len(b) :
        print(a)
    else :
        print(b)
else :
    for i in range(m) :
        a=a+str(n)
    for i in range(n) :
        b=b+str(m)
    print(a)

Solution (Python):
a,b= map(int,input().split())
c = str(a)*b
d = str(b)*a
arr =[c,d]
print(sorted(arr)[0])

Solution (Python):




"""
このプログラムはPythonを書く際のテンプレとなっています。これをコピペしてコーディングを行なってください。
なお字下げしないこと！！
"""

__author_ = 'Maruta Yuzuha'
__version_ = '1.0.0'
__date__ = '2019/12/25'

def main():
    """
    ここでプログラムの解説を行う
     >>main()
    Hello world.
    0
    """
    s = input().split()
    a = 0
    b = 0
    for i in range(int(s[1])):
        if i == 0:
            a = s[0]
        else:
            a += s[0]

    for i in range(int(s[0])):
        if i == 0:
            b = s[1]
        else:
            b += s[1]

    if int(a) >= int(b):
        print(a)
    else:
        print(b)

    return 0

if __name__ == '__main__':
    
    

    
    
    import doctest
    doctest.testmod()

    
    import sys
    sys.exit(main())

Solution (Python):
a, b = map(int, input().split())
ab = str(a) * b
ba = str(b) * a
print(ab if ab <= ba else ba)

Solution (Python):
b = input()
c =b.split(" ")
a = int(c[0])
d = int(c[1])
if a > d:
    print(c[1] * a)
else:
    print(c[0]*d)

Solution (Python):
def resolve():
    a, b = input().split()
    ab_list = []
    
    ab = a*int(b)
    ba = b*int(a)

    ab_list.append(ab)
    ab_list.append(ba)
 
    ab_list = sorted(ab_list)
 
    print(ab_list[0])
 
if __name__ == "__main__":
    resolve()

Solution (Python):
a,b=map(int,input().split())
A=str(a)
B=str(b)
num_1=int(A*b)
num_2=int(B*a)
if num_1>num_2:
  print(num_1)
elif num_1<num_2:
  print(num_2)
elif num_1==num_2:
  print(num_1)

Solution (Python):
a, b = map(int, input().split())

a_b = str(a) * b
b_a = str(b) * a

if a_b > b_a:
  print(b_a)
else:
  print(a_b)

Solution (Python):
s = input().rstrip().split(' ')
a = int(s[0])
b = int(s[1])
first = str(a) * b
second = str(b) * a
lst = [first, second]
lst.sort()
print(lst[0])

Solution (Python):
a, b = map(int, input().split())

a_l = []
b_l = []
for i in range(b):
    a_l.append(str(a))
for i in range(a):
    b_l.append(str(b))

a_b = ''.join(a_l)
b_a = ''.join(b_l)

lst = sorted([a_b, b_a])
print(lst[0])

Solution (Python):
a,b = map(int,input().split())


x = []
y = []
ans = []
for i in range(a):
    x.append(str(b))
for j in range(b):
    y.append(str(a))

if b < a:
    ans = ''.join(x)
    print(ans)
elif a < b:
    ans = ''.join(y)
    print(ans)
elif b == a:
    ans = ''.join(y)
    print(ans)

Solution (Python):
a, b = map(str, input().split())

A = int(a * int(b))
B = int(b * int(a))

if A > B:
  print(A)
else:
  print(B)

Solution (Python):
a,b = map(int,input().split())

x = 0
y = 0
n = 1
m = 1

for i in range(b):
    x = x + a*n
    n = n*10

for i in range(a):
    y = y + b*m
    m = m*10

print(max(x,y))

Solution (Python):
a,b = map(int, input().split())
A = 0
B = 0

for i in range(0,a):
    A = A + (10 ** i) * b

for i in range(0,b):
    B = B + (10 ** i) * a

if a <= b:
    print(B)
else:
    print(A)

Solution (Python):
a, b = map(int, input().split())

ab = ''
ba = ''

for i in range(a):
    ab += str(b)

for i in range(b):
    ba += str(a)

if ab <= ba:
    print (ab)
else:
    print (ba)

Solution (Python):
a, b = map(int, input().split())
c = str(a) * b
d = str(b) * a
print(d if c > d else c)

Solution (Python):
a,b = map(int ,input().split())

A = ""
B = ""

for i in range(b):
    A += str(a)

for i in range(a):
    B += str(b)

lis = []
lis.append(A)
lis.append(B)

lis.sort()

print(lis[0])

Solution (Python):
a, b = map(int, input().split())

if a > b:
  print(str(b) * a)  
else:
  print(str(a) * b)

Solution (Python):
a,b=map(int,input().split())
print(str(a)*b if a<b else str(b)*a)

Solution (Python):
a, b = input().split()

A = a * int(b)
B = b * int(a)


if int(a) <= int(b) or a == b:
    print(A)
else:
    print(B)

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(str(b)*a)
else:
    print(str(a)*b)

Solution (Python):
a,b=map(int,input().split())

astr=( str(a) * b )
bstr=( str(b) * a )

print(astr if astr < bstr else bstr)

Solution (Python):
s_list = list(map(int, input().split()))

final_list = [(str(s_list[0]) * s_list[1])]
final_list.append(str(s_list[1]) * s_list[0])
final_list.sort()
print(final_list[0])

Solution (Python):
A = list(map(int,input().split()))

Str_a = str(A[0]) * A[1]
Str_b = str(A[1]) * A[0]

if A[0] <= A[1]:
    print(Str_a)
else:
    print(Str_b)

Solution (Python):
a,b = input().split()

tmp1 = a * int(b)
tmp2 = b * int(a)

ans =sorted([tmp1,tmp2])
print(ans[0])

Solution (Python):
a, b = map(int, input().split())

a_str, b_str = [], []
for i in range(0,b):
  a_str.append(a)
for i in range(0,a):
  b_str.append(b)

if a > b :
  print(''.join(map(str,b_str)))
else :
  print(''.join(map(str,a_str)))

Solution (Python):
from itertools import repeat
a, b = input().split()
a = int(a)
b = int(b)
l = []
if a < b or a == b:
    a = str(a)
    l.extend(repeat(a, b))
    print("".join(l))
else:
    b = str(b)
    l.extend(repeat(b, a))
    print("".join(l))

Solution (Python):
a, b = map(int, input().split())
if a < b:
    print(str(a)*b)
else:
    print(str(b)*a)

Solution (Python):
A, B = input().split()

AB = A*int(B)
BA = B*int(A)

ret = sorted([AB, BA])
print(ret[0])

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

ab = str(str(a) * b)
ba = str(str(b) * a)

print(sorted([ab, ba])[0])

Solution (Python):
a, b = map(int, input().split())

A = 0
B = 0
for i in range(b):
    A += a * (10 ** i)

for j in range(a):
    B += b * (10 ** j)

l = [str(A), str(B)]
l2 = sorted(l)
print(int(l2[0]))

Solution (Python):
a, b = map(int, input().split())

s = ''
for i in range(a):
    s = s + str(b)

t = ''
for i in range(b):
    t = t + str(a)

l = [s, t]
l.sort()
print(l[0])

Solution (Python):
a,b = list(map(int,input().split()))
str_a = ""
str_b = ""
for i in range(b):
    str_a += str(a)
for i in range(a):
    str_b += str(b)

if str_a >= str_b:
    print(str_b)
else:
    print(str_a)

Solution (Python):
a, b = [int(i) for i in input().split()]

stra = str(a) * b
strb = str(b) * a

if stra < strb:
    print(stra)
else:
    print(strb)

Solution (Python):
a,b=map(int,input().split())
if a>b:
    print(str(b)*a)
else:
    print(str(a)*b)

Solution (Python):
a, b = map(int, input().split())
x = str(a) * b 
y = str(b) * a
z = sorted([x, y])
print(z[0])

Solution (Python):
a,b = input().split( )
if int(a)<int(b):
    print(a*int(b))
else:
    print(b*int(a))

Solution (Python):
a, b = [i for i in input().split()]
print(sorted([a*int(b), b*int(a)])[0])

Solution (Python):
a,b = map(int, input().split())


a_s = ""
b_s = ""

for _ in range(b):
    a_s = a_s + str(a)

for _ in range(a):
    b_s = b_s + str(b)

if a_s <= b_s:
    print(a_s)
else:
    print(b_s)

Solution (Python):
a, b = map(str, input().split())

string1 = a * int(b)
string2 = b * int(a)

if string1 > string2:
  print(string2)
else:
  print(string1)

Solution (Python):
a, b = map(int,input().split())

stra = str(a) * b
strb = str(b) * a
ablist = [stra, strb]
ablist = sorted(ablist)
print(ablist[0])

Solution (Python):
a,b = map(str, input().split())

a_b = (a*int(b))
b_a = (b*int(a))

if a_b < b_a:
    print(a_b)
else:
    print(b_a)

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

A = ""
B = ""

for i in range(b):
  A = A + str(a)

for i in range(a):
  B = B + str(b)

C= [A, B]
C.sort()
print(str(C[0]))

Solution (Python):
a, b = map(int, input().split())


A = ["".join(str(a) for i in range(b))]
B = ["".join(str(b) for i in range(a))]

C = A+B

C.sort()
print(C[0])

Solution (Python):
import sys; readline = sys.stdin.readline

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

if a == b:
    print(str(a) * a)
else:
    if a < b:
        a, b = b, a
    
    print(str(b) * a)

Solution (Python):
li = input().split()

if li[0]>=li[1]:
  print(li[1] *int(li[0]))
else:
  print(li[0] *int(li[1]))

Solution (Python):
a,b=map(int,input().split())
if a<=b:
 c=str(a)*b
 print(c)
else:
 c=str(b)*a
 print(c)

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

    print()
else:
    str=""
    for i in range(b):
        print(a,end="")

    print()

Solution (Python):
a, b = input().split()
ab = a * int(b)
ba = b * int(a)
if ab < ba:
  	print(ab)
else:
    print(ba)

Solution (Python):
a,b = list(map(int,input().split()))
s = min(a,b)
l = max(a,b)
print(str(s)*l)

Solution (Python):
a, b=map(int, input().split())
if a >= b:
    ans=str(b) * a
else:
    ans=str(a) * b

print(ans)

Solution (Python):


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

a_str = ''
for i in range(b):
    a_str += str(a)

b_str = ''
for i in range(a):
    b_str += str(b)



if a_str == b_str:
    print(a_str)
elif a_str > b_str:
    print(b_str)
else:
    print(a_str)

Solution (Python):
a,b = map(int,input().split())
if a > b:
    print(str(b)*a)
else:
    print(str(a)*b)

Solution (Python):
a, b = map(int, input().split(' '))
min = min(a, b)
max = max(a, b)

out = [str(min) for i in range(max)]
print(''.join(out))

Solution (Python):
a, b = [int(i) for i in input().split()]
if a >= b:
  print(str(b)*a)
else:
  print(str(a)*b)

Solution (Python):
a, b = map(int,input().split())
A = ''
B = ''
for i in range(b):
    A += str(a)
for j in range(a):
    B += str(b)
C = []
C.append(A)
C.append(B)
D = sorted(C)
print(D[0])

Solution (Python):
a,b = map(int,input().split())
if a >= b:
    ans = 0
    for i in range(a):
        ans += b*(10**i)
else:
    ans = 0
    for i in range(b):
        ans += a*(10**i)
print(ans)

Solution (Python):
a, b = input().split()

a2 = int(a)
b2 = int(b)

a3 = a * b2
b3 = b * a2

arr = [a3, b3]
arr.sort()
print(arr[0])

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

Solution (Python):
c = input().split(" ")
a = int(c[0])
b = int(c[1])

a_ans = 0
if a <= b:
    for i in range(b):
        a_ans += a * (10 ** i)
    print(a_ans)

b_ans = 0
if b < a:
    for i in range(a):
        b_ans += b * (10 ** i)
    print(b_ans)

Solution (Python):
a, b=map(int, input().split())
ans1=[]
ans2=[]
if b<=a:
    for i in range(a):
        ans1.append(b)
else:
    for i in range(b):
        ans2.append(a)

if b<=a:
    ans1=int("".join(map(str, ans1)))
    print(ans1)
else:
    ans2=int("".join(map(str, ans2)))
    print(ans2)

Solution (Python):
a,b = input().split()

if a > b:
    a,b = b,a

print(a*int(b))

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b) = [int(e) for e in lines[0].split(" ")]

    return (a, b)


def solve(a, b):

    x = str(a) * b 
    y = str(b) * a
    
    result = x
    if y < x:
        result = y

    return result
    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
a,b=map(int,input().split())
count=""
if a>b:
  for i in range(a):
    count+=str(b)
else:
  for j in range(b):
    count+=str(a)

print(count)

Solution (Python):
a, b = map(int, input().split())
x =""
if a < b:
  a = str(a)
  for i in range(b):
    x += a
  print(x)
elif a >= b:
  b = str(b)
  for i in range(a):
    x += b
  print(x)

Solution (Python):
a, b = input().split()
a_w = a * int(b)
b_w = b * int(a)

if a > b:
  print(b_w)
else:
  print(a_w)

Solution (Python):
a,b=input().split()
aa=bb=''

for i in range(int(b)):
    aa+=a
for i in range(int(a)):
    bb+=b

if aa < bb:print(aa)
else :print(bb)

Solution (Python):
a, b = map(int, input().split())

if str(a) * b < str(b) * a:
    print(str(a) * b)
else:
    print(str(b) * a)

Solution (Python):
a,b = map(int,input().split())
if a > b: print (int(str(b)*a))
if a < b: print (int(str(a)*b))
if a == b: print(int(str(a)*a))

Solution (Python):
a, b = map(int, input().split(' '))

s1 = str(a) * b
s2 = str(b) * a

s = [s1, s2]
s.sort()

print(s[0])

Solution (Python):
a, b = map(int,input().split())

if a >= b:
  b = str(b)
  print(b*a)
else:
  a = str(a)
  print(a*b)

Solution (Python):
[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="")

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

x=str(a)*b
y=str(b)*a
    
print(min(x,y))

Solution (Python):
a, b = input().split()
A = a * int(b)
B = b * int(a)
l = sorted([A , B])
print(l[0])

Solution (Python):
a,b=map(str,input().split())
A=[]
B=[]
for i in range(int(b)):
    A.append(a)
for k in range(int(a)):
    B.append(b)
N="".join(A)
M="".join(B)
q=sorted([N,M])
print(q[0])

Solution (Python):
F = [int(f) for f in input().split()]
a = F[0]
b = F[1]

for i in range(max(a,b)):
    print(min(a,b), end="")

Solution (Python):
a,b = input().split()
print(a*int(b)if a<b else b*int(a))

Solution (Python):
A, B = map(int, input().split())
if (A==B):
    Yes=[str(A)]*A

elif (A>B):
    Yes=[str(B)]*A
else:
    Yes=[str(A)]*B

s = ''.join(Yes)
print(s)

Solution (Python):
a,b = map(int, input().split(" "))
aa = a*str(b)
bb = b*str(a)
list = sorted([aa,bb])
print(str(list[0]))

Solution (Python):
a, b = map(int, input().split())

A = [str(a) * b]
B = [str(b) * a]

A = int(A[0])
B = int(B[0])

liA = []
liB = []

for a in str(A):
    liA.append(int(a))

for b in str(B):
    liB.append(int(b))


for i in range(len(min(liA, liB)) - 1):
    if liA[i] < liB[i]:
        print(A)
        break
    elif liB[i] < liA[i]:
        print(B)
        break
else:
    print(A)

Solution (Python):
a,b = input().split()
a_1 = a
b_1 = b
for i in range(int(b)-1):
    a_1 += a
for i in range(int(a)-1):
    b_1 += b
l = [a_1,b_1]
l.sort()
print(l[0])

Solution (Python):
a, b = map(int, input().split())
if a <= b:
  print(str(a) * b)
else:
  print(str(b) * a)

Solution (Python):
a,b = map(int,input().split())
A = str(a) * b
B = str(b) * a
x = [A, B]
x.sort()
print(x[0])

Solution (Python):
N=list(map(int,input().split()))
a=N[0]
b=N[1]
if a>b:
  B=str(b)
  print(B*a)
else:
  A=str(a)
  print(A*b)

Solution (Python):
a,b=map(int, input().split())
A=[a]*b
B=[b]*a
As="".join(map(str,A))
Bs="".join(map(str,B))
Ai=int(As)
Bi=int(Bs)
if a>b:
    print(str(Bi))
else:
    print(str(Ai))

Solution (Python):
a, b = map(int, input().split())

if a < b:
    ans = [str(a)] * b
else:
    ans = [str(b)] * a

print(''.join(ans))

Solution (Python):
a,b = map(int, input().split())

left = ""
right = ""

for i in range(b):
  left += str(a)
for i in range(a):
  right += str(b)

nlist = [str(right), str(left)]
nlist.sort()

print(nlist[0])

Solution (Python):
a,b=map(int,input().split())
n=""
if a>b:
    for i in range(a):
        n=(str(n)+str(b))
    print(n)
else:
    for i in range(b):
        n=(str(n)+str(a))
    print(n)

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

a,b=map(int,input().split())
print(min(str(a)*b,str(b)*a))

Solution (Python):
a, b = input().split()
_a = int(a)
_b = int(b)

if _a >= _b:
    print(''.join([b for i in range(_a)]))
else:
    print(''.join([a for i in range(_b)]))

Solution (Python):
a, b = map(int, input().split())
print(str(min(a,b))*max(a,b))

Solution (Python):
S=list(map(int,input().split()))
S1=str(S[0])
S2=str(S[1])
S3=S1*S[1]
S4=S2*S[0]
if S[0]<=S[1]:
    print(S3)
else:
    print(S4)

Solution (Python):
a, b = input().split()
if (int(b) <= int(a)): print(b * int(a)); exit(0)
else: print(a * int(b)); exit(0)

Solution (Python):
N,M = map(int,input().split())
ans = str("")

if(N<=M):
    for i in range(M):
        ans = ans + str(N)
else:
    for i in range(N):
        ans = ans + str(M)
        
print(ans)

Solution (Python):
a, b = map(int,input().split())
a1 = a
b1 = b
aa = str(a)
sa = aa * b1
bb = str(b)
sb = bb * a1
if(int(sa) >= int(sb)):
    print(sa)
else:
    print(sb)

Solution (Python):
inputs = input().strip().split()

A = inputs[0] * int(inputs[1])
B = inputs[1] * int(inputs[0])
print(A if A < B else B)

Solution (Python):
hoge = input()
tmp = hoge.split()

tmp1 = tmp[0] * int(tmp[1])
tmp2 = tmp[1] * int(tmp[0])

piyo = [tmp1,tmp2]
piyo.sort()
print(int(piyo[0]))

Solution (Python):
a, b = map(int,input().split())
if(a < b):
    print(str(a)*b)
else:
    print(str(b)*a)

Solution (Python):
ai,bi = list(input().split())

a = ai*int(bi)
b = bi*int(ai)

if int(ai) <= int(bi):
    print(a)
else:
    print(b)

Solution (Python):
tmp = input().split()
a = int(tmp[0])
b = int(tmp[1])

ans_a = a
ans_b = b
for i in range(b-1):
 ans_a =(ans_a*10) + a

for i in range(a-1):
 ans_b =(ans_b*10) + b

if ans_a == ans_b:
 print(ans_a)
else:
 list = [str(ans_a),str(ans_b)]
 list.sort()
 print(list[0])

Solution (Python):
a, b = map(int, input().split())

mi, ma = min(a, b), max(a, b)

print(str(mi) * ma)

Solution (Python):
A,B = map(int,input().split())
X = 0
Y = 0
for i in range(B):
    X += A * (10 ** i)
for i in range(A):
    Y += B * (10 ** i)
if A >= B :
    print(Y)
else:
    print(X)

Solution (Python):
a,b = map(int,input().split())
ans = min(a,b)
ans_l = [str(ans) for i in range(max(a,b))]
print(''.join(ans_l))

Solution (Python):
a,b = map(int, input().split())
ans = ''
if a<=b:
	for i in range(b): ans += str(a)
elif a>b:
	for i in range(a): ans += str(b)
print(ans)

Solution (Python):
A=input()
a,b=int(A.split()[0]),int(A.split()[1])
c,d="",""
for i in range(b):
  c+=str(a)
for i in range(a):
  d+=str(b)

if(int(c)<int(d)):
  nu=c
else:
  nu=d
for i in range(len(nu)):
  if(int(c[i])<int(d[i])):
    print(c)
    break
  elif(int(c[i])>int(d[i])):
    print(d)
    break
  elif(c==d):
    print(c)
    break

Solution (Python):
x,y = map(int,input().split())
if x>= y:
    res = str(y)*x
else:
    res = str(x)*y
res = int(res)
print(res)

Solution (Python):
import sys
bbn=1000000007
	


		
def main():
	b , c = map(int, input().split())
	if b > c:
		b,c=c,b
	ret=''.join([str(b)]*c)
	print(ret)
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
a, b = map(int,input().split())
x = str(min(a,b))
y = max(a,b)
print(x*y)

Solution (Python):
a,b = map(int,input().split())
ans = ""
if a>=b:
    for i in range(a):
        ans += str(b)
else:
    for i in range(b):
        ans+= str(a)
    
print(ans)

Solution (Python):
a,b = map(int,input().split())

aa = str(a)*b
bb=str(b)*a


if aa>bb:
    print(bb)
else:
    print(aa)

Solution (Python):
a, b = map(int,input().split())
a_l = list(str(a)*b)
b_l = list(str(b)*a)
c = 0
for i in range(0,min(len(a_l),len(b_l))):
    if c == len(a_l)-1:
        print(int(str(b)*a))
        break
    if a_l[i] == b_l[i]:
        c += 1
        continue
    if a_l[i] > b_l[i]:
        print(int(str(b)*a))
        break
    if a_l[i] < b_l[i]:
        print(int(str(a)*b))
        break

Solution (Python):
l = list(map(int, input().split()))

a = ""
b = ""

for i in range(l[0]):
    a += str(l[1])
for j in range(l[1]):
    b += str(l[0])
s = [a, b]
s = sorted(s)

print(s[0])

Solution (Python):
a,b = map(int, input().split())

A=[]
B=[]
for i in range(a):
  B.append(str(b))

for j in range(b):
  A.append(str(a))
  
A_=str(''.join(A))
B_=str(''.join(B))

answer=(A_,B_)
answer=sorted(answer)


print(answer[0])

Solution (Python):
N,M=map(int,input().split())

if str(N)*M>str(M)*N:
    print(str(M)*N)
else:
    print(str(N)*M)

Solution (Python):
a, b = map(int, input().split())
result = ""
if a < b:
    for i in range(b):
        result += str(a)
else:
    for i in range(a):
        result += str(b)
print(result)

Solution (Python):
a,b= map(int, input().split())

if a<=b:
    for i in range(b):
        print(a,end="")
else:
    for j in range(a):
        print(b,end="")

Solution (Python):
s=list(map(int,input().split()))
a=str(s[0])
b=str(s[1])
c='0'
d='0'
for i in range(s[1]):
  c+=a
for j in range(s[0]):
  d+=b
c.strip('0')
d.strip('0')
c=int(c)
d=int(d)
if c<d:
  print(d)
else:
  print(c)

Solution (Python):
a,b=map(int, input().split())

A=str(a)*b
B=str(b)*a

print( min(A,B) )

Solution (Python):
a, b = map(int, input().split()) 

if a>=b:
  print(str(b)*a)
else:
  print(str(a)*b)

Solution (Python):
a,b = map(int, input().split())
string=""
if a>b:
    for i in range(a):
        string = string + str(b)
elif b>a:
    for i in range(b):
        string = string + str(a)
else:
    for i in range(b):
        string = string + str(a)
print(string)

Solution (Python):


"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(a, b):
    if a > b:
        return int(str(b) * a)
    else:
        return int(str(a) * b)

    
    



do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    a, b = list(map(int, input().split()))
    
    
    
    
    print(sol(a, b))

Solution (Python):
x,y=map(int,input().split())
if x<y:
  z=0
  for i in range(0,y):
    z+=10**i*x
  print(z)
else:
  z=0
  for i in range(0,x):
    z+=10**i*y
  print(z)

Solution (Python):
a,b = input().split()

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

print(min(ab,ba))

Solution (Python):
a, b= map(int, input().split())

a_s = str(a)
b_s = str(b)

a_w=a_s
b_w=b_s

while b > 1:
    a_w+=a_s
    b -= 1

while a > 1:
    b_w+=b_s
    a -= 1

test_list = [a_w, b_w] 

res = min(filter(lambda s:isinstance(s, str), test_list)) 

print(res)

Solution (Python):
a,b = map(int,input().split())

ab = str(a) * b
ba = str(b) * a

if ab == ba:
    print(ab)
if ab > ba:
    print(ba)
if ba > ab:
    print(ab)

Solution (Python):
a, b = map(int, input().split())
if a>=b:
  t=str(b)
  for i in range(a-1):
    t+=str(b)
  print(t)
else:
  t=str(a)
  for i in range(b-1):
    t+=str(a)
  print(t)

Solution (Python):
a,b=map(int,input().split())
zz=str(a)*int(b)
yy=str(b)*int(a)


arr=[]
arr.append(zz)
arr.append(yy)
res = min(filter(lambda s:isinstance(s, str),arr))
print(res)

Solution (Python):
a,b=map(int,input().split())
A=str(a)*b
B=str(b)*a
if A[0]<=B[0]:
  print(A)
else:print(B)

Solution (Python):

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

A = [a for i in range(int(b))]
B = [b for i in range(int(a))]

if a <= b:
  print(''.join(A))
else:
  print(''.join(B))

Solution (Python):
a, b = input().split()
A = int(a * int(b))
B = int(b * int(a))

print(max(A,B))

Solution (Python):
a, b = map(int, input().split())
if str(a)*b >= str(b)*a:
	print(str(b)*a)
else:
	print(str(a)*b)

Solution (Python):
a, b = map(str,input().split())
list = []
c = a * int(b)
d = b * int(a)
list.append(c)
list.append(d)
list.sort()
print(list[0])

Solution (Python):
a, b = map(int, input().split())

s1 = str(a) * b
s2 = a * str(b)

if s1 < s2:
    print(s1)
elif s1 > s2:
    print(s2)
elif s1 == s2:
    print(s1)

Solution (Python):
a, b = input().split()

A = int(a)
B = int(b)

print((a * B) if A <= B else (b * A))

Solution (Python):
a, b = input().split()
if a*int(b) <= b*int(a):
    print(a*int(b))
else:
    print(b * int(a))

Solution (Python):
a, b = map(int, input().split())
a_str = ''
for _ in range(b):
    a_str += str(a)
b_str = ''
for _ in range(a):
    b_str += str(b)

dic = [a_str, b_str]
dic.sort()
print(dic[0])

Solution (Python):
a,b=map(int,input().split())

a_kake_b=''
for i in range(b):
  a_kake_b=a_kake_b+str(a)

b_kake_a=''
for i in range(a):
  b_kake_a=b_kake_a+str(b)




if a_kake_b[0]>b_kake_a[0]:
  print(b_kake_a)
elif a_kake_b[0]<b_kake_a[0]:
  print(a_kake_b)
else:
  if len(a_kake_b)>len(b_kake_a):
    print(b_kake_a)
  elif len(a_kake_b)<len(b_kake_a):
    print(a_kake_b)
  else:
    if int(a_kake_b)>int(b_kake_a):
      print(b_kake_a)
    else:
      print(a_kake_b)

Solution (Python):
a,b=input().split()
a_=int(a)
b_=int(b)
af=""
bf=""
for i in range(b_):
    af+=a
for i in range(a_):
    bf+=b
a=int(af)
b=int(bf)
print(max(a,b))

Solution (Python):
a, b = map(int, input().split())
if a >= b:
	for i in range(a):
		print(b, end='')
	print('\n')
else:
	for i in range(b):
		print(a, end='')
	print('\n')

Solution (Python):
a, b = input().split()

a_text = a * int(b)
b_text = b * int(a)

if a_text < b_text:
    print(a_text)
else:
    print(b_text)

Solution (Python):
a, b =map(int,input().split())
A = 0
B = 0
for i in range(b):
    A += a*(10**i)
    
for i in range(a):
    B += b*(10**i)

if a < b:
    print(A)
elif a >b:
    print(B)
else:
    print(min(A,B))

Solution (Python):
a,b = map(int, input().split())

ta = tb = ""
for _ in range(b):
  ta+=str(a)
for _ in range(a):
  tb+=str(b)

t=[ta,tb]
t.sort()
print(t[0])

Solution (Python):
a,b = map(int, input().split())
ans = ""

for i in range(max(a,b)):
    ans += (str(min(a,b)))
print(ans)

Solution (Python):
a,b=map(int,input().split())
print(str(min(a,b))*max(a,b))

Solution (Python):

a,b=(int(x) for x in input().split())
i = 1

if  a == b:
    while (i<=a):
        print(a, end="")
        i += 1
elif a>b:
    while (i<=a):
        print(b, end="")
        i += 1
elif a<b:
    while (i<=b):
        print(a, end="")
        i += 1

print()

Solution (Python):
a, b = input().split()

dict = {}
dict[a] = a * int(b)
dict[b] = b * int(a)

dict_sorted = sorted(dict.items(), key=lambda x:x[0])

print (dict_sorted[0][1])

Solution (Python):
a, b = map(str, input().split())
aa = ""
bb = ""
for i in range(int(b)):
  aa += a
for j in range(int(a)):
  bb += b
if int(a) < int(b):
  print(aa)
elif int(b) < int(a):
  print(bb)
else:
  print(aa)

Solution (Python):
N,M = map(int,input().split())

if N <= M:
    ans = str(N) * M
else:
    ans = str(M) * N
print(ans)

Solution (Python):
a,b=map(int,input().split())
print(str(a)*b if a<b else str(b)*a)

Solution (Python):
a, b = list(map(int, input().split()))
A = int(str(a)*b)
B = int(str(b)*a)
print(A if A/(10**b)<B/(10**a) else B)

Solution (Python):
a, b = input().split()
A = a*int(b)
B = b*int(a)
if a < b:
    print(A)
else:
    print(B)

Solution (Python):
a,b = map(int, input().split())
aList = [b]*a
bList = [a]*b
i = 0
l = min(len(bList),len(aList))
if a==b:
    pass
else:
    while aList[i]==bList[i]:
        i+=1
        if i+1==l:
            break
if aList[i]>bList[i]:
    print(*bList,sep="")
else:
    print(*aList,sep="")

Solution (Python):
a, b = map(int, input().split())
ans = min(str(a) * b, str(b) * a)
print(ans)

Solution (Python):
a, b = input().split(' ')
if a > b:
    print(b * int(a))
else:
    print(a * int(b))

Solution (Python):
def main():
    a, b = map(int, input().split(" "))
    if a < b:
        print(str(a) * b)
    else:
        print(str(b) * a)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    a, b = input().split()
    astr = a * int(b)
    bstr = b * int(a)
    ans = sorted([astr, bstr])
    print(ans[0])

if __name__ == "__main__":
    main()

Solution (Python):
n,m=map(int,input().split())

if n<m:
    print(str(n)*m)
else:
    print(str(m)*n)

Solution (Python):
a, b = map(int, input().split())
 
ab = str(a) * int(b)
ba = str(b) * int(a)
 
ans = sorted([ab, ba])
print(ans[0])

Solution (Python):
a, b = map(int, input().split())

if a > b:
    ans = str(b) * a
else:
    ans = str(a) * b

print(ans)

Solution (Python):
a,b = map(int, input().split())

if a <= b:    
    print("{}".format(str(a)*b))
else:
    print("{}".format(str(b)*a))

Solution (Python):
a, b = map(str, input().split())
if int(a) >= int(b):
    b = b*int(a)
    print(int(b))
else:
    a = a*int(b)
    print(int(a))