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):
def main():

    a, b = input().split()
    s = a * int(b)
    t = b * int(a)

    if s < t:
        return s
    return t

if __name__ == '__main__':
    print(main())

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
ab = list(map(int,input().split()))
ab.sort()
print(str(ab[0])*ab[1])

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

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

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

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

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

Solution (Python):
def comparing_strings():
    
    a, b = input().split()
    
    str_a = ''
    str_b = ''
    
    for _ in range(int(b)):
        str_a = str_a + a
    for _ in range(int(a)):
        str_b = str_b + b
    
    if str_a <= str_b:
        return str_a
    else:
        return str_b

result = comparing_strings()
print(result)

Solution (Python):
A,B = map(int,input().split())
num = min(A,B)
num1 = max(A,B)
count=0
for i in range(num1):
  count += num*(10**i)
print(count)

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
b = str(B)*A

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

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

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

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:
    for i in range(b):
        print(a, end="")
else:
    for i in range(a):
        print(b, end="")
print("")

Solution (Python):
a,b=map(int,input().split())
if a==b:
    print(f"{a}"*a)
elif a>b:
    print(f"{b}"*a)
elif a<b:
    print(f"{a}"*b)

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

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

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

Solution (Python):


"""
https://atcoder.jp/contests/abc152/tasks/abc152_b
Comparing starings.
"""

def solve(n, m):
    if n > m: print(f"{m}"*n)
    elif m >= n: print(f"{n}"*m)

    return

if __name__ == "__main__":
    n, m = list(map(int, input().split()))

    solve(n, m)

Solution (Python):






































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    a, b = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

    result = min(str(a)*b, str(b)*a)

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['4 3']
        lines_export = ['3333']
    if pattern == 2:
        lines_input = ['7 7']
        lines_export = ['7777777']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):


def solve(a,b):
  str1 = str(a)*b
  str2 = str(b)*a
  if str1 < str2:
    return str1
  else:
    return str2



def main():
  a,b = map(int,input().split())
  print(solve(a,b))
  return

if __name__ == '__main__':
  main()

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

Solution (Python):
list1=input().split()
A=(list1[0])*(int(list1[1]))
B=(list1[1])*(int(list1[0]))
list2=[A,B]
list2.sort()
print(list2[0])

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

if a<=b:
    [print(a,end="") for _ in range(b)]
else:
    [print(b,end="") for _ in range(a)]

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

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

Solution (Python):

import collections as cl
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    _a, _b = input().split()

    a = _a * int(_b)
    b = _b * int(_a)
    print(a if a < b else b)


main()

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

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:
    for i in range(b):
        print(a,end = '')
else:
    for i in range(a):
        print(b,end = '')

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

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

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

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

Solution (Python):
a,b=input().split();print([b*int(a),a*int(b)][a<b])

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())


a,b= LI()





def generateStr(s,n):
    result = ''
    temp = str(s)
    for _ in range(n):
        result += temp 
    return result

a_str = generateStr(a,b)
b_str = generateStr(b, a)

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

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())
list_a = []
list_b = []

for i in range(a):
    list_a.append(str(b))

for i in range(b):
    list_b.append(str(a))
    
A = ''.join(list_a)
B = ''.join(list_b)

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

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

if not ( 1 <= a <= 9 and 1 <= b <= 9 ): sys.exit()
if not ( isinstance(a,int) and isinstance(b,int) ): sys.exit()

array_a = ''.join([ str(a) for z in range(b) ])
array_b = ''.join([ str(b) for z in range(a) ])
array = [array_a,array_b]
array.sort()

print(array[0])

Solution (Python):
a,b = [int(_) for _ in input().split()]
a_str = str(b)*a
b_str = str(a)*b
list_str = [a_str,b_str]
list_str.sort()
print(list_str[0])

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

print(str(a)*b)

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

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

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

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

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

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

win = aS
for i in range(len(aS)):
  aF = aS[i]
  if (i >= len(bS)):
    win = aS
    break
  elif (int(aS[i]) > int(bS[i])):
    win = bS
    break
  elif (int(aS[i]) < int(bS[i])):
    win = aS
    break
  else:
    continue
print(win)

Solution (Python):
a,b = 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_A)
else:
  print(str_B)

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

Solution (Python):

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

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

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

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

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

a_str = ""
b_str = ""

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

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

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

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

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

a,b = i2()
a1 = ""
b1 = "" 
for i in range(b):
	a1 += str(a)
for i in range(a):
	b1 += str(b)

if a1 < b1:
	print(a1)
else:
	print(b1)

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

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

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

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

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

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

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

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

Solution (Python):
line = list(input().split())
line.sort()
print(line[0] * int(line[1]))

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

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

Solution (Python):
a,b=map(int,input().split())
x=str(a)*b
y=str(b)*a
for i in range(len(min(x,y))):
  if x[i]<y[i]:
    print(x)
    break
  elif x[i]>y[i]:
    print(y)
    break
if x==y:
  print(x)

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

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

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 = map(int,input().split())
if a<b:
  print(str(a)*b)
else:
  print(str(b)*a)

Solution (Python):
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    a, b = MI()
    L = sorted([a, b])
    if L[0] == a:
        ans = int(str(a)*b)
    else:
        ans = int(str(b)*a)
    print(ans)


    
    

if __name__ == "__main__":
	main()

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

Solution (Python):


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

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

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

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

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

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

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

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

n1 = a*int(b)
n2 = b*int(a)

ans = n1 if int(n1) > int(n2) else n2

print(ans)

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

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

    print(s)

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

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 = map(str,input().split())
ans = ''
if int(a) > int(b):
	for _ in range(int(a)):
		ans += b
else:
	for _ in range(int(b)):
		ans += a
print(ans)

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

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

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

if x > y:
    print(x)
else:
    print(y)

Solution (Python):
m, n = input().split()
str1 = m
str2 = n
if str1 * int(n) < str2 * int(m):
	print(str1 * int(n))
elif str1 * int(n) == str2 * int(m):
	print(str1 * int(n))  
else:
	print(str2 * int(m))

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 = map(int, input().split())
ans = ''

if a <= b:
  for _ in range(b):
    ans += str(a)
  print(int(ans))
else:
  for _ in range(a):
    ans += str(b)
  print(int(ans))

Solution (Python):
def main():
    a, b = map(int, input().split())
    A = ''
    for i in range(b):
        A = str(a) + A
    B = ''
    for i in range(a):
        B = str(b) + B
    dicA = int(A[0])
    dicB = int(B[0])
    if dicA < dicB:
        print(A)
    else:
        print(B)
main()

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

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

Solution (Python):
a,b=map(int,input().split())
if a>b:
  a,b=b,a
L=[str(a)]*b
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):
import sys
input = sys.stdin.readline

A=list(input().rstrip().split())
print(min(A)*int(max(A)))

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

Solution (Python):


a, b = map(int, input().split())
s1 = ("{}".format(a)) * b
s2 = ("{}".format(b)) * a

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

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

a, b = input()[:-1].split()
print(min(''.join(a for i in range(int(b))), ''.join(b for i in range(int(a)))))

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

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

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

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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())
c = str(a)*b
d = str(b)*a
my_list = [c, d]
my_list.sort()
print(my_list[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 = input().split()
if a < b:
    print(a * int(b))
elif a > b:
    print(b * int(a))
else:
    print(a * int(a))

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:
  print(a*str(b))
else:
  print(b*str(a))

Solution (Python):

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

str_a = str(a) * b
str_b = str(b) * a
print(sorted([str_a, str_b])[0])

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

print(str(min(int(a),int(b)))*int(str(max(int(a),int(b)))))

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

l = []

l.append(''.join([a] * int(b)))
l.append(''.join([b] * int(a)))

l.sort()

print(l[0])

Solution (Python):
def main():
  a, b = input().split()
  ansA = ''
  ansB = ''
  
  for _ in range(int(b)):
    ansA += a
  for _ in range(int(a)):
    ansB += b
    
  if ansA > ansB:
    print(ansB)
  elif ansA <= ansB:
    print(ansA)
  
  
  
  
main()

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

ax=a*int(b)
bx=b*int(a)

if ax>bx:
    print(bx)
else:
    print(ax)

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

A = a*int(b)
B = b*int(a)
AB = [A, B]
AB.sort()
print(AB[0])

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

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

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

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

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

mod = 10**9+7
sys.setrecursionlimit(mod) 

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

a, b = LI()

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

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

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

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

Solution (Python):
import sys
from operator import itemgetter

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():
    a, b = ss()
    sa = a*int(b)
    sb = b*int(a)

    if sa <= sb:
        print(sa)
    else:
        print(sb)

    return

main()

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

c = max(a, b)
d = min(a, b)

print(''.join([str(d) for i in range(c)]))

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

Solution (Python):


import io
import sys
import math

def solve(a,b):
    
    s = str(min(a,b))
    n = max(a,b)
    return s * n

def main():
    
    a,b = map(int, input().split())
    
    
    ans = str( solve(a,b) )
    
    
    print(ans)
    return ans
        

_DEB = 0   

_INPUT = """\
7 7
"""
_EXPECTED = """\
7777777
"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")


if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

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

s = str(a) * b
t = str(b) * a

if s > t: print(t)
else: print(s)

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

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())
if a < b:
  print(str(a) * b)
else:
  print(str(b) * a)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    a, b = map(int, readline().split())
    
    s1 = str(a) * b
    s2 = str(b) * a
    if s1 < s2:
        print(s1)
    else:
        print(s2)
        
    
    return


if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
a, b = (int(x) for x in input().split())
ans=0
if a==b:
  for i in range(a):
    ans+=a*pow(10,i)
elif a>b:
  for i in range(a):
    ans+=b*pow(10,i)
else:
  for i in range(b):
    ans+=a*pow(10,i)
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(int, input().split())
print(min(str(a) * b, str(b) * a))

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())
ans = ''
if a <= b:
  for i in range(b):
    ans = ans + str(a)
else:
  for i in range(a):
    ans = ans + str(b)
print(ans)

Solution (Python):

a=sorted(input().split())
print(a[0]*int(a[1]))

Solution (Python):
import sys












stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    
    a,b = map(int, stdin.readline().rstrip().split())
    
    
    
    
    
    mojiretu1 = str(a) * b
    mojiretu2 = str(b) * a
    if a < b:
        print(mojiretu1)
    else:
        print(mojiretu2)


if __name__ == '__main__':
    solve()

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())
print(min(str(a) * b ,str(b) * a))

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

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

n = N
for i in range(1, int(M)):
    n += N

m = M
for i in range(1, int(N)):
    m += M

ans = [n, m]
ans.sort()

print(ans[0])

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

print(a*int(b) if a < b else b*int(a))

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

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

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

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=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())
l=[]
if a>=b:
    for i in range(a):
        l.append(b)
else:
    for i in range(b):
        l.append(a)

print(''.join(map(str,l)))

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(str(a)*b)
else:
    print(str(b)*a)

Solution (Python):

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

c=a>b

print(str(b if c else a)*(a if c else b))

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

Solution (Python):
from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
from fractions import gcd
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7

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

print(int(ans))

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

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

if a < b:
    print(a_str)
elif a > b:
    print(b_str)
else:
    print(a_str)

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

Solution (Python):
a,b=map(str,input().split())
ans_list=[]
ans_list.append(''.join([a]*int(b)))
ans_list.append(''.join([b]*int(a)))
ans_list.sort()
print(ans_list[0])

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

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

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

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

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

print(min(x, y))

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

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

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

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

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

if an<am:
  print(an)
else:
  print(am)

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

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

str1 = a * int(b)
str2 = b * int(a)

if str1 > str2: print(str2)
else: print(str1)

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

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

Solution (Python):
a,b = map(int,input().split())
A = str(a)*b
B = str(b)*a
if 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())
A = str(a)*b
B = str(b)*a
if A <= B:
  print(A)
else:
  print(B)

Solution (Python):
A,B=input().split()
S=[A*int(B),B*int(A)]
ans=sorted(S)
print(ans[0])

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque


from collections import Counter

from itertools import accumulate,combinations,permutations

from heapq import heapify,heappop,heappush


from functools import lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    

    
    N, K = map(int, input().split())
    
    
    

    if N<=K:
        print(str(N)*K)
    else:
        print(str(K)*N)




if __name__ == "__main__":
    main()

Solution (Python):


a, b = input().split()

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

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

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

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

Solution (Python):
a,b=map(int,input().split())
x=0
if a<=b:
  while b>0:
    x+=a*(10**(b-1))
    b-=1
else:
  while a>0:
    x+=b*(10**(a-1))
    a-=1
print(x)

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

Solution (Python):
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])

Solution (Python):
a=[v for v in input().split()]
if a[0]<a[1]:  
    u=int(a[1])
    for i in range (0,u):
        print(a[0],end='')
else:
    u=int(a[0])
    for i in range (0,u):
        print(a[1],end='')

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


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

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

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