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=[str(a)*b,str(b)*a]
L2=sorted(L)
print(L2[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(str, input().split())

ans_a = []
for i in range(int(b)):
  ans_a.append(a)

ans_b = []
for i in range(int(a)):
  ans_b.append(b)

if "".join(ans_a) > "".join(ans_b):
  print("".join(ans_b))
else:
  print("".join(ans_a))

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

s, l = [a, b] if a < b else [b, a]

print(str(s)*l)

Solution (Python):
arr=list(map(int,input().split()))
n=arr[0]
m=arr[1]
if m>n:
  for i in range(m):
    print(n,end='')
else:
  for i in range(n):
    print(m,end='')

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

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

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

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())
num = a if a <= b else b
loop = a if a > b else b
out = ""
for i in range(loop):
    out = out + str(num)
print(out)

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

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

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


print(max(int(ab),int(ba)))

Solution (Python):
a, b = raw_input().split()
Z = [a * int(b), b * int(a)]
print sorted(Z)[0]

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

l = str(a)*b
m = str(b)*a

if l < m:
    print(l)
else:
    print(m)

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

if (a == b):
    answer = [a] * a
elif (a > b):
    answer = [b] * a
else :
    answer = [a] * b

answer = list(map(str, answer))
answer = ''.join(answer)
print(answer)

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

Solution (Python):

"""
Created on Sun Jan 19 20:57:54 2020

@author: masat
"""

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

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

print("".join(answer))

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

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)

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

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

c = ""

if a<=b:
 for i in range(b):
  c += str(a)
else:
 for i in range(a):
  c += str(b)

print(c)

Solution (Python):
def join_str(num, loop_num):
  s = ''
  for i in range(loop_num):
    s = s + str(num)
  return s

a, b = map(int, input().split())
if a >= b:
  print(join_str(b, a))
else:
  print(join_str(a, b))

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

i = 0
a_str = ""
while i < int(b):
    a_str += a
    i += 1

i = 0
b_str = ""
while i < int(a):
    b_str += b
    i +=1

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

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):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


a, b = read_ints()

if b < a:
    a, b = b, a

print(str(a) * b)

Solution (Python):
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(4, 3), '3333')

    def test_2(self):
        self.assertEqual(think(7, 7), '7777777')


def solve():
    a, b = read()
    result = think(a, b)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b):
    s_a, s_b = str(a), str(b)
    canditate_a = str(a) * b
    canditate_b = str(b) * a
    return min(canditate_a, canditate_b)


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

Solution (Python):
import sys
a,b = input().split()
int_a,int_b = int(a),int(b)
moji_a = a
moji_b = b
for _ in range(int_b - 1) :
    moji_a += a

for _ in range(int_a - 1) :
    moji_b += b

for i in range(min(len(moji_a),len(moji_b))) :
    if int(moji_a[i]) < int(moji_b[i]) :
        print(moji_a)
        sys.exit()
    elif int(moji_a[i]) > int(moji_b[i]):
        print(moji_b)
        sys.exit()

if len(moji_a) < len(moji_b) :
    print(moji_a)
else :
    print(moji_b)

Solution (Python):


iim = lambda: map(int, input().rstrip().split())

def resolve():
    a, b = iim()

    if a > b:
        a, b = b, a
    print("{0}".format(a)*b)

if __name__ == "__main__":
    resolve()

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

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

out_1 = int(a*int(b))
out_2 = int(b*int(a))

print(max(out_1, out_2))

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

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

if a <= b:
  print(aa)
else:
  print(bb)

Solution (Python):
n, h = map(int, input().split())
if n >= h:
    s = str(h)* n
else:
    s = str(n)* h
print(s)

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

Solution (Python):


if __name__ == "__main__":
    a, b = map(int,input().split())
    A = str(a) * b
    B = str(b) * a
    lis = [A, B]
    lis.sort()
    print(lis[0])

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

ans = []
if a >= b:
    ans = [b] * a
else:
    ans = [a] * b
    
for x in ans:
    print(x,end="")

Solution (Python):
a,b = input().split()
a = int(a)
b = int(b)
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(a):
        string =  string+str(a)
print(string)

Solution (Python):
import math
import sys

(N, M) = list(map(int,input().split()))

if N >  M:
    s = N
    N = M
    M = s 

print(''.join([str(N) for _ in range(M)]))

Solution (Python):
a,b=map(int,input().split())
S=max(a,b)
T=min(a,b)
B=str(T)
for i in range(S-1):
  B=B+str(T)
print(B)

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

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_b = a * int(b)
b_a = b * int(a)
if int(a) <= int(b):
  print(a_b)
else:
  print(b_a)

Solution (Python):
def func():
    return



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



ans = ""
if a <= b:
    for i in range(b):
        ans += str(a)
else:
    for j in range(a):
        ans += str(b)

print(ans)

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

S = [a * int(b), b * int(a)]
S.sort()

print(S[0])

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

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

print(a if n <= m else b)

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

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

if a < b:
  print(str(a) * b)
elif b < a:
  print(str(b) * a)
elif a == b:
  print(str(a) * b)

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

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

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

Solution (Python):
x,y= map(int,input().split())

a= str(x)*y
b= str(y)*x

print(a if a<b else b)

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

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

min_value = min(a, b)

max_value = max(a, b)

min_value_list = []
for i in range(max_value):
    min_value_list.append(str(min_value))

print("".join(min_value_list))

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())
c,d = min(a,b),max(a,b)
e = str(c) * d
print(e)

Solution (Python):
s=list(input().split())

a=int(s[0])
b=int(s[1])
a_b=''
b_a=''

for i in range(b):
 a_b+=s[0]


for i in range(a):
 b_a+=s[1]

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

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

a_hairetu = ''
b_hairetu = ''

for i in range(a):
  b_hairetu = b_hairetu + str(b)
b_sin = int(b_hairetu)
  
for i in range(b):
  a_hairetu = a_hairetu + str(a)
a_sin = int(a_hairetu)

if a>=b:
  print(b_sin)
else:
  print(a_sin)

Solution (Python):

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

Solution (Python):
INPUT = list(map(int,input().split()))
a = INPUT[0]
b = INPUT[1]

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

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

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

Solution (Python):

a,b = list(map(int, input().split()))
A=[]
B=[]
for row in range(b):
    A.append(a)
for row in range(a):
    B.append(b)

A=''.join(map(str,A))
B=''.join(map(str,B))

T=sorted([A,B])
print(T[0])

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

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

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

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

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

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

L.append(str(a) * b)
L.append(str(b) * a)

L.sort()

print(L[0])

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

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

Solution (Python):
a,b=map(int,input().split())
a_str = str(a)
b_str = str(b)
A = a_str*b
B = b_str*a
List = [A,B]
List_sorted = sorted(List)
print(List_sorted[0])

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

if a > b:
    ans = ""
    for _ in range(a):
        ans = ans + str(b)

else:
    ans = ""
    for _ in range(b):
        ans = ans + str(a)

print ans

Solution (Python):
a,b = map(int,input().split())
c = str(a)
d = str(b)
e = c
f = d
g = ''
h = ''
for i in range(b):
  g += e
for j in range(a):
  h += f
dic = [g,h]
dic.sort()
print(dic[0])

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

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

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

if a>=b:
  less = b
  big = a
else:
  less = a
  big = b

st = str(less)
out=""
for i in range(big):
  out += st
print(out)

Solution (Python):
a,b = map(int,input().split())
ans_1 = 0
ans_2 = 0
for i in range(a):
    ans_1 += (10 ** i) * b
for j in range(b):
    ans_2 += (10 ** j) * a
if b <= a:
    print(ans_1)

else:
    print(ans_2)

Solution (Python):


a, b = input().split()

A = ""
B = ""
for i in range(int(b)):
    A += a
for i in range(int(a)):
    B += b

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

Solution (Python):
N, M = input().strip().split(" ")

array = []
array.append(N*int(M))
array.append(M*int(N))

ans = sorted(array)

print(ans[0])

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

Solution (Python):
a,b = input().split()
a = int(a)
b = int(b)
astr = ""
bstr = ""
for i in range(0,a):
	astr += str(b)

for i in range(0,b):
	bstr += str(a)

if ord(astr[:1]) > ord(bstr[:1]):
	print(bstr)
elif ord(astr[:1]) < ord(bstr[:1]):
	print(astr)
else:
	print(astr)

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

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

x = str(x)
y = 0
for j in range(0,a):
    y+=b*(10**j)
y = str(y)
if x>=y:
    print(y)

else:
    print(x)

Solution (Python):
a,b = map(int,input().split())
ab = [str(a) * b, str(b) * a]
ab.sort()
print(int(ab[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())

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

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

Solution (Python):
a,b = input().split()
a1 = a*int(b)
a2 = b*int(a)
print(min(a1,a2))

Solution (Python):
def p(a, b):
  for _ in range(b):
    print(str(a), end='')
  print('')

a, b = map(int, input().split())
if a == b:
  p(a,b)
elif a < b:
  p(a, b)
else:
  p(b, a)

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

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

Solution (Python):
a,b = map(str, input().split())
 
lis = []
res_a = a
res_b = b
 
for i in range(int(b)-1):
  res_a += a
lis.append(res_a)
 
for i in range(int(a)-1):
  res_b += b
lis.append(res_b)
 
print(int(sorted(lis)[0]))

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

for i in range(a-1):
    b_ += str(b)
for i in range(b-1):
    a_ += str(a)
anc = []
anc.append(b_)
anc.append(a_)

print(sorted(anc)[0])

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

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

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

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

a_L = []
a_L.append(a*int(b))
a_L.append(b*int(a))
a_L.sort()
print(a_L[0])

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


print(min(A,B))

Solution (Python):

import sys
from fractions import gcd
from string import ascii_uppercase as ABC

def inpl(): return list(map(int, input().split()))

a, b = inpl()
print(min(str(a)*b, str(b)*a))

Solution (Python):

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

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

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

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

print(max(int(tmp1), int(tmp2)))

Solution (Python):
a, b = input().split()
c = a * int(b)
d = b * int(a)
print(int(min(c, d)))

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

c = a*int(b)
d = b*int(a)

if c[0] < d[0]:
    print(c)
else:
    print(d)

Solution (Python):
a, b = input().split(' ')
s1=''
s2=''
for x in range(int(b)): s1+=a
for x in range(int(a)): s2+=b
if s1 <= s2:
    print(s1)
else: print(s2)

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

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

if a<=b :
	for i in range(b):
		x+=a*(10**i)
else :
	for i in range(a):
		x+=b*(10**i)

print(x)

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

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

char = min(a, b)
rep = max(a,b)

print(str(char) * rep)

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

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

if s1 < s2:
    print(s1)
else:
    print(s2)

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

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

aa = a
bb = b

for i in range(bb-1):
  a = str(a) + str(aa)

for j in range(aa-1):
  b = str(b) + str(bb)

print(max(int(a),int(b)))

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

Solution (Python):
def calculate(a,b):
    s1 = list([str(a)]*b)
    s1 = "".join(s1)

    s2 = list([str(b)]*a)
    s2 = "".join(s2)

    arr = [s1,s2]

    arr = sorted(arr)

    print(arr[0])

S = input().split(" ")
a = int(S[0])
b = int(S[1])

calculate(a,b)

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

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

Solution (Python):
a, b = map(int, input().split())
t = min(a, b)
x = max(a, b)
print(("%d"%t)*x)

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

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

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

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

Solution (Python):
na, nb = map(int,input().split())
astr = str(na)*nb
bstr = str(nb)*na

if(astr>bstr):
    print(bstr)
else:
    print(astr)

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

a = int(a)
b = int(b)

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

Solution (Python):
tmp = input().split(" ")
a = tmp[1]*int(tmp[0])
b = tmp[0]*int(tmp[1])
l = [str(a),str(b)]
l.sort()
print(l[0])

Solution (Python):


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


print(''.join([str(min(a, b))] * max(a, b)))

Solution (Python):

import sys


def solve(a: int, b: int):
    a = str(a)
    b = str(b)

    r = a * int(b)
    r2 = b * int(a)

    result = sorted([r, r2])[0]
    print(result)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    a = int(next(tokens))  
    b = int(next(tokens))  
    solve(a, b)


if __name__ == "__main__":
    main()

Solution (Python):
x,y = map(int,input().split())
word = ""
if x < y:
  for i in range(y):
    word += str(x)
else:
  for i in range(x):
    word += str(y)

print(word)

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

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

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

if a != 1:
    for i in range(int(b)-1):
        aa = aa + a
if b != 1:
    for j in range(int(a)-1):
        bb = bb + b

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

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())

if (a < b):
  out = str(a)
  for i in range(1, b):
    out += str(a)
  print(out)
else:
  out = str(b)
  for i in range(1, a):
    out += str(b)
  print(out)

Solution (Python):
import sys

a, b = map(int, input().split())
a_ = int(str(a)*b)
b_ = int(str(b)*a)
la = len(str(a_))
lb = len(str(b_))
if a_ == b_:
    print(a_)
    sys.exit()
for i in range(min(la, lb)):
    ai = str(a_)[i]
    bi = str(b_)[i]
    if ai > bi:
        print(b_)
        sys.exit()
    elif ai < bi:
        print(a_)
        sys.exit()

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

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

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

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

else :
    a=str(a)
    for i in range(0,b):
        ans+=a
    print(ans)

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

s=str(min(a,b))
m=max(a,b)
print(s*m)

Solution (Python):
list=input().split()
a=list[0]*int(list[1])
b=list[1]*int(list[0])
ans=[a,b]
answer=sorted(ans)
print(answer[0])

Solution (Python):
a,b=map(str, input().split())
x = ''
y = ''
for i in range(int(b)):
  x += a
for i in range(int(a)):
  y += b

if str(x) < str(y):
  print(x)
else:
  print(y)

Solution (Python):
def main():
    a, b = [int(_) for _ in input().split()]
    x1 = int(str(a) * b)
    x2 = int(str(b) * a)
    print(max(x1, x2))
main()

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

list = []

c = a*int(b)
d = b*int(a)

list.append(c)
list.append(d)

list = sorted(list)

print(list[0])

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

Solution (Python):

a, b = map(int, input().split())
seq =''
sa = seq.join([str(a)]*b)
sb = seq.join([str(b)*a])

ans = min(sa, sb)

print(ans)

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

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

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

ans = ""



if a < b:
    for i in range(b):
        ans = ans + aa
elif a == b:
    for i in range(a):
        ans = ans + bb
else:
    for i in range(a):
        ans = ans + bb
print(ans)

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

A = "{}".format(a)
A_ = A * b

B = "{}".format(b)
B_ = B * a

List = [B_, A_]
sorted_List = List.sort()

print(List[0])

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

c = a
d = b

for i in range(int(b) - 1):
    c += a
    
for j in range(int(a) - 1):
    d += b

if int(c) > int(d):
    print(int(c))
else:
    print(int(d))

Solution (Python):
import math,sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
lili=lambda:list(map(int,sys.stdin.readlines()))
li = lambda:list(map(int,input().split()))

I=lambda:int(input())
S=lambda:input().strip()
mod = 1000000007

a,b=li()
s=""
t=""
for i in range(0,b):
    s=s+str(a)
for i in range(0,a):
    t=t+str(b)
s=int(s)
t=int(t)

print(max(s,t))

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

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

print(''.join([str(n) for n in c]))

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

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

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

print(str(sm)*bg)

Solution (Python):
arr = [int(x) for x in raw_input().split()] 

a, b = arr[0], arr[1]

sa = str(a) * b
sb = str(b) * a

if sa < sb:
	print sa
else:
	print sb

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

fi = str(a)*b
se = str(b)*a

num = max(a, b)

for i in range(num):
    ff = int(fi[i])
    ss = int(se[i])
    if ff<ss:
        print(fi)
        break
    elif ss<ff:
        print(se)
        break
    else:
        pass

    if i==num-1:
        print(fi)

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

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

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

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


ab_str = str(a) * b
ba_str = str(b) * a




if ab_str >= ba_str:
    print(ba_str)
else:
    print(ab_str)

Solution (Python):
a,b = map(int,input().split(" "))
s = min(a,b)
t = max(a,b)
ans = ''
for i in range(t):
    ans += str(s)
print(ans)

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(str, input().split())

a_s = a * int(b)
b_s = b * int(a)

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

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

Solution (Python):
n = [int(i) for i in input().split()]
print(str(min(n)) * max(n))

Solution (Python):
u = input()

a = u[0];
b = u[2];
at = int(a)
bt = int(b)

x = b*at
y = a*bt

if x <= y:
  print(x)

else:
 print(y)

Solution (Python):
a, b = (int(x) for x in input().split())

a_str = str(a) * b
b_str = str(b) * a

print(min(a_str, b_str))

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

s1 = ''
s2 = ''

for i in range(0, a):
    s1 += str(b)
for i in range(0, b):
    s2 += str(a)

if s1 <= s2:
    print(s1)
else:
    print(s2)

Solution (Python):


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

small = min(a, b)
large = max(a, b)

ans = ''

for i in range(large):
    ans += str(small)

print(ans)

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

x = a * int(b)
y = b * int(a)

print(sorted([x, y])[0])

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

Dic = [a * int(b), b * int(a)]
Dic.sort()
ans = Dic[0]
print(ans)

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

m = 0


if a[1] <= a[0]:
  for i in range(a[0]):
    m += a[1]*(10**i)
else:
  for i in range(a[1]):
    m += a[0]*(10**i)

  
print(m)

Solution (Python):
a, b = map(int, input().split())
_a = str(a)*b
_b = str(b)*a
ret = []
ret.append(_a)
ret.append(_b)
ret.sort()
print(ret[0])

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

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

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

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

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


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

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

u = max(a,b)
s = str(max(a,b))
t = str(min(a,b))

ans = t
for i in range(u-1):
    ans = ans + t

print(ans)

Solution (Python):
a,b = map(int,input().split())
numlist = []
if b > a:
  for i in range(b):
    numlist.append(str(a))
else:
  for i in range(a):
    numlist.append(str(b))
print("".join(numlist))

Solution (Python):

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

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




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

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

Solution (Python):
a = input().rstrip().split()
A = int(a[0])
B = int(a[1])
if A > B:
  print(str(B)*A)
else:
  print(str(A)*B)

Solution (Python):


import  sys

def solve152B(a, b):
	minI, maxI = a, b
	if a > b:
		maxI, minI = a, b
	
	st = ""
	for i in range(maxI):
		st += str(minI)
	
	print(st)


if __name__ == "__main__":
	a, b = list(map(int, input().split()))

	solve152B(a, b)

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

Solution (Python):
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


def fetch_ints_inputs(times):
    return [fetch_int_input() for _ in range(times)]

a, b = fetch_int_input()

strs = []
strs.append("".join([str(a) for _ in range(b)]))
strs.append("".join([str(b) for _ in range(a)]))

print(sorted(strs)[0])

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

if N>M:
  for i in range(N):
    a+=M*(10**i)
else:
   for i in range(M):
    a+=N*(10**i)
print(a)

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

c = 0
d = 0

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

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(str, input().lower().split())
str1 = ""
str2 = ""
for i in range(int(b)):
    str1 = str1 + a

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

if str1 < str2:
    print(str1)
elif str1 > str2:
    print(str2)
elif str1 == str2:
    print(str1)

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

myans = ''
if a > b:
    for i in range(a):
        myans += str(b)
elif b > a:
    for i in range(b):
        myans += str(a)
else:
    for i in range(a):
        myans += str(a)
    
print(myans)

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

strA = str(a) * b
strB = str(b) * a

print(min(strA, strB))

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 = [int(x) for x in input().split()]
print(str(a)*a) if a == b else print(str(min(a, b))*max(a, b))

Solution (Python):
a, b = sorted(map(int, raw_input().split()))
print str(a) * b

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

Solution (Python):
A, B = map(int, input().split())
if A > B:
    A, B = B, A
A = str(A)
print(A * B)

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

print(min(s1,s2))

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

output_str = ""
if a < b:
  for s in range(0,b):
    output_str = output_str + str(a)
else:
  for s in range(0,a):
    output_str = output_str + str(b)

print(output_str)

Solution (Python):
a, b = sorted(input())[1:]
print(a * int(b))

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

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

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

if a >= b:
    print(str(b) * a)
elif a < b:
    print(str(a) * b)

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

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

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