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 row(a, b):
    result = ''
    for _ in range(a):
        result += str(b)

    return result


a, b = [int(s) for s in input().split()]

if a > b:
    b_row = row(a, b)
    print(b_row)
else:
    a_row = row(b, a)
    print(a_row)

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())
def fn(n, m):
  k = 0
  for i in range (m):
    k = k + n * 10 ** i
  return k
if a > b:
  print(fn(b, a))
elif a < b:
  print(fn(a, b))
else:
  print(fn(a, b))

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

elem1 = ''.join([str(a)] * b)
elem2 = ''.join([str(b)] * a)
lst = sorted([elem1, elem2])
print(lst[0])

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

Solution (Python):
a, b = map(int, input().split())
s1 = "".join("%s" % a for _ in range(b))
s2 = "".join("%s" % b for _ in range(a))
print(min(s1, s2))

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

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=input().split()
s1=a[0]*int(a[1])
s2=a[1]*int(a[0])
if s1<s2:
    print(s1)
else:
    print(s2)

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

print(min(str(A)*B, str(B)*A))

Solution (Python):
a,b = list(map(int, input().split()))
t = [min(a,b)] * max(a,b)

print("".join(map(str,t)))

Solution (Python):
a,b = list(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 = list(map(int, input().split()))


_a = str(a) * b
_b = str(b) * a
ans = min(_a,_b)
print(ans)

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

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

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

Solution (Python):
a,b=[int(i) for i in input().split()];M=max(a,b);m=min(a,b)
print(str(m)*M)

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

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

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

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

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

x=0
L=max(a,b)
S=min(a,b)

for i in range(L):
  x=10*x+S

print(x)

Solution (Python):
a,b = input().split()
aa=''.join([a for _ in range(int(b))])
bb=''.join([b for _ in range(int(a))])
print(max(int(aa),int(bb)))

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)
elif 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):
line=input()
line=line.split()
if int(line[0])<=int(line[1]):
    for i in range(int(line[1])):
        print(int(line[0]),end="")
else :
    for i in range(int(line[0])):
        print(int(line[1]),end="")
print()

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

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

Solution (Python):


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

v = min({a, b})
l = max({a, b})
print(str(v) * l)

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

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

def num(a,b):
    a = str(a) * b
    return a
    
aa = num(a,b)
bb = num(b,a)

def compare(a,b):
    if len(a) > len(b):
        return a
    else:
        return b

bigger = compare(aa,bb)

if aa == bb:
    print(aa)

for n in range(len(bigger)):
    if int(aa[n]) > int(bb[n]):
        print(bb)
        break
    elif int(aa[n]) < int(bb[n]):
        print(aa) 
        break 
    else:
        continue

Solution (Python):
a,b = input().split()
if a > b:
    print(int(b)*int('1'*int(a)))
elif a < b:
    print(int(a)*int('1'*int(b)))
else:
    left = int(b)*int('1'*int(a))
    right = int(a)*int('1'*int(b))
    print(max(left,right))

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

Solution (Python):

import sys


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

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

for i in range(d):
    e = e + c

print(e)

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

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

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

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

one = str(a) * b
two = str(b) * a
lst = [one,two]
lst.sort()
print(lst[0])

Solution (Python):
a, b = input().split()
str_list = []
a_ = a * int(b)
b_ = b * int(a)
str_list.append(a_)
str_list.append(b_)
str_list = sorted(str_list)
print('%s' % str_list[0])

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




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


if __name__ == "__main__":
    main()

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

SA=[a]*b
SB=[b]*a

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

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())
s1=str(b)*a
ss1=int(s1)
s2=str(a)*b
ss2=int(s2)
if ss1>ss2:
    print(s1)
else:
    print(s2)

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(int,input().split())
x=[str(a)*b,str(b)*a]
x.sort()
print(x[0])

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

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

print(str(a) * b)

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

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

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

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

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

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

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

if __name__ == '__main__':
    main()

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

a, b = a*int(b), b*int(a)

print(min(a, b))

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

L_new = [None, None]
L_new[0] = L[0]*int(L[1])
L_new[1] = L[1]*int(L[0])

sorted_L = sorted(L_new)

print(sorted_L[0])

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

print(str(a)*b)

Solution (Python):
a,b=map(int,input().split())
x=min(a,b)
for i in range(max(a,b)):
  print(x,end="")

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

ia, ib = int(a), int(b)

s1 = a * ib
s2 = b * ia

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

Solution (Python):




def main():
    a, b = map(int, input().split())
    print(str(min([a, b])) * max([a, b]))


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
x = min(a, b)
for i in range(max(a, b)):
  print(x, end="")

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

Solution (Python):
a,b=map(int,input().split())
x=10
tmpa=a
tmpb=b
for i in range(tmpb-1):
    a+=tmpa*x
    x*=10
x=10
for i in range(tmpa-1):
    b+=tmpb*x
    x*=10

print(min(str(a),str(b)))

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()

com1 = a//(10**(len(str(a))-1))
com2 = b//(10**(len(str(b))-1))

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

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

Solution (Python):
def repeat(n, m):
    if m==0:
        return ""
    else:
        return str(n)+repeat(n, m-1)

n, m = list(map(int, input().split()))
if n<m:
    print(repeat(n, m))
else:
    print(repeat(m, n))

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

list = [str(a) * b, str(b) * a]

print(sorted(list)[0])

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

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

Solution (Python):
N,S = [int(x) for x in input().split()]
a=max(N,S)
b=min(N,S)
c=0
for i in range(a): c+=b*10**i
print(c)

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

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

print(str(a)*b)

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

Solution (Python):

import sys


def solve(a: int, b: int):
    ab = str(a)*b
    ba = str(b)*a
    if ab > ba:
        print(ba)
    else:
        print(ab)


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

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

Solution (Python):
n, m = input().strip().split()
a = ""
if(n<m):
  for i in range(int(m)):
    a += n
else:
  for i in range(int(n)):
    a += m
print(a)

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

Solution (Python):
a,b=input().split()
c=int(a)
d=int(b)
e=(a*d)
f=(b*c)
g=e[0:1]
h=f[0:1]
if g<=h:
    print(e)
else:
    print(f)

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

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

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

Solution (Python):
import sys
row = sys.stdin.readline
def read_strings(row):
    return list(map(str, row().split()))
  
a, b =read_strings(row)
print(min(a * int(b),b*int(a)))

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

a.sort()
for i in range(a[1]):
    ans.append(a[0])

print(int(''.join(map(str,ans))))

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

list = [str(a)*b, str(b)*a]
list = sorted(list)

print(list[0])

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

Solution (Python):
A, B = [str(i) for i in input().rstrip().split(' ')];
_a = _b = ""
for i in range(int(B)): _a += A 
for a in range(int(A)): _b += B 
_str = [_a, _b]
_str.sort()
print(_str[0])

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

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()
print(max(int(a*int(b)), int(b*int(a))))

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

Solution (Python):
a,b = map(str,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())
text = ""
if a >= b:
  for i in range(a):
    text += str(b)
else:
  for i in range(b):
    text += str(a)
print(text)

Solution (Python):
import numpy as np
import math

if __name__ == "__main__":
  _a, _b = map(str,input().split())
  a_int, b_int = int(_a), int(_b)

  a_b = _a*b_int
  b_a = _b*a_int
  if a_b <= b_a:
    print(a_b)
  else:
    print(b_a)

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

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

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

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

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

if a > b:
    print(strB)
else:
    print(strA)

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

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

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

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

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

dif = a if a > b else b
ans = 0
for i in range(dif):
  ans += 10**i*(a+b-dif)
print(ans)

Solution (Python):
a,b=input().split()
lst=[a*int(b),b*int(a)]
lst.sort()
print(lst[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_list = [a]*b
b_list = [b]*a
a_list = map(str, a_list)
b_list = map(str, b_list)
a_list = "".join(a_list)
b_list = "".join(b_list)
if a==b:
    print(a_list)
else:
    print(a_list) if a < b else print(b_list)

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

Solution (Python):

from sys import stdin




def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


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

Solution (Python):
x = input().split()
a, b = [int(i) for i in x]
s = min(a, b)
b = max(a, b)
print(str(s)*b)

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

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

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

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

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

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

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

Solution (Python):
ab = [int(i) for i in input().split()]

a = 0
b = 0

for i in range(0,ab[1]):
  a *= 10
  a += ab[0]

for i in range(0,ab[0]):
  b *= 10
  b += ab[1]

ab[0] = str(a)
ab[1] = str(b)

ab = sorted(ab)

print(ab[0])

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

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

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

print(A)

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

a=y[0]
b=y[1]

char1=a*int(b)
char2=b*int(a)

if int(char1)>int(char2):
    print(char1)
else:
    print(char2)

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

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

print(bb if a>b else aa)

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

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

print(bb if a>b else aa)

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

Solution (Python):
s = input().split()
a = int(s[0])
b = int(s[1])
answer = ""
if(b<=a):
  for i in range(a):
    answer = answer + str(b)
else:
  for i in range(b):
    answer = answer + str(a)
print(answer)

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

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

print(aa if a < b else bb)

Solution (Python):
import numpy as np

x = list(map(int,input().split()))
if x[0] > x[1]:
    ans = np.repeat(x[1],x[0])
    for i in ans:
        print(i, end="")
    
elif x[0] < x[1]:
    ans = np.repeat(x[0],x[1])
    for i in ans:
        print(i, end="")
    
else:
    ans = np.repeat(x[0],x[1])
    for i in ans:
        print(i, end="")

Solution (Python):
A,B = map(int,input().split())
S1,S2 = "",""
for i in range(A):
    S1 = S1 + str(B)
for i in range(B):
    S2 = S2 + str(A)
if(int(S1) > int(S2)):
    print(S1)
else:
    print(S2)

Solution (Python):

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29

DIV = (10**9) + 7

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)

def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max,mod=DIV):
    fac,finv,inv = [0]*max, [0]*max, [0]*max
    fac[0]=fac[1]=1
    finv[0]=finv[1]=1
    inv[1]=1
    for i in range(2,max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod -inv[mod%i] * (mod//i)%mod
        finv[i] = finv[i-1]*inv[i]%mod
    class CONV:
        def __init__(self):
            pass
        def ncr(self,n,k):
            if(n<k):
                return 0
            if(n<0 or k<0 ):
                return 0
            return fac[n]*(finv[k]*finv[n-k]%mod)%mod
    return CONV()



def main():
    N,M =isRaw()
    return min(str(N)*M,str(M)*N)


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

Solution (Python):
a,b=(int(x) for x in input().split())
la=[]
for i in range(b):
  la.append(str(a))
ao="".join(la)
lb=[]
for i in range(a):
  lb.append(str(b))
bo="".join(lb)
l=[]
l.append(ao)
l.append(bo)
l.sort()
print(l[0])

Solution (Python):

class Solution:
    def solve(self, a, b):
        str1 = "".join([str(b) for _ in range(a)])
        str2 = "".join([str(a) for _ in range(b)])

        if str1 <= str2:
            return str1
        else:
            return str2


sol = Solution()

[a, b] = list(map(int, input().strip().split(" ")))

print(sol.solve(a, b))

Solution (Python):


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

if a <= b:
    print("".join([str(a)]*b))
else:
    print("".join([str(b)]*a))

Solution (Python):
import sys
import os

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

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

Solution (Python):
import numpy as np
 
a, b = input().split()
 
s = []
s.append(a*int(b))
s.append(b*int(a))
 
s = np.sort(s)
 
print(s[0])

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

List = [a,b]
List.sort()

if  List[0] == a:
    combinea = ''
    for i in range(int(b)):
        combinea += a
    print(combinea)

else:
    combineb = ''
    for i in range(int(a)):
        combineb += b
    print(combineb)

Solution (Python):
def f(k):
    ret = ""
    for i in range(k):
        ret += "1"
    return int(ret)

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

if a < b:
    ans = a*f(b)
else:
    ans = b*f(a)
print(ans)

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

Solution (Python):


a, b = map(lambda x: int(x), input().split())
lst = [str(a) * b, str(b) * a]
print(min(lst))

Solution (Python):


a, b = map(lambda x: int(x), input().split())
lst = [str(a) * b, str(b) * a]
lst.sort()
print(lst[0])

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

Solution (Python):

a, b = tuple(input().split())
smaller = min(int(a), int(b))
larger = max(int(a), int(b))

rtStr = ""
for i in range(larger):
    rtStr += str(smaller)

print(rtStr)

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

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

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

print(min(x,y))

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

first = 0
second = 0

for i in range(0,num[0]):
    first = first + num[1]*(10**i)

for i in range(0,num[1]):
    second = second + num[0]*(10**i)

ans = max(first,second)

print(ans)

Solution (Python):
a, b = map(int, input().split())
c = ""
if a<b:
  for _ in range(b):
    c += "{}".format(a)
else:
  for _ in range(a):
    c += "{}".format(b)
print(c)

Solution (Python):
n, m = [int(x) for x in input().split()]
if n > m:
  [n, m] = [m, n]
print(str(n)*m)

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

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

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

Solution (Python):
class Solution:
    def solve(self, a: int, b: int) -> str:

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


if __name__ == '__main__':

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

    
    solution = Solution()
    print(solution.solve(a, b))

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

ans1=min(a,b)
ans2=max(a,b)

ans=0

for i in range(ans2):
	ans=ans+ans1*10**i
	
print(ans)

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

list_a = [0]*int(b)
list_b = [0]*int(a)

for i in range(0,int(b)):
    list_a[i] = int(a)*10**i

for i in range(0,int(a)):
    list_b[i] = int(b)*10**i
    
a_r = sum(list_a) 
b_r =sum(list_b)

if(a<b):
    print(str(a_r))
elif(a>b):
    print(str(b_r))
else:
    print(str(a_r))

Solution (Python):



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

Solution (Python):
import numpy as np
a,b=input().split()


a_int =int(a)
b_int = int(b)


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

else:
    for i in range(a_int):
        c += str(b)
    print(c)

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

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



C = [A, B]
C.sort()

print(C[0])

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

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

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

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

ans=""
for i in range(int(q)):
    ans+=p
print(ans)

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

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

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

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

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

if a == b:
    o = str(a)
    for i in range(b-1):
        o = o + str(a)
elif a > b:
    o = str(b)
    for i in range(a-1):
        o = o + str(b)
elif a < b:
    o = str(a)
    for i in range(b-1):
        o = o + str(a)
print(o)

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

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

Solution (Python):
lst = list(map(int, input().split()))
if lst[0] >= lst[1]:
    res = str(lst[1])*lst[0]
    print(res)
else:
    res = str(lst[0])*lst[1]
    print(res)

Solution (Python):


"""
name: A-500.py
プログラムの説明
"""

def main():
    a,b = map(int, input().split())
    all_a = str(a) * b
    all_b = str(b) * a

    
    

    if (all_a < all_b):
        print(all_a)
    else :
        print(all_b)

if __name__ == '__main__':
    main()

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

Solution (Python):
def repeat_string(x, y):
    """Return the digit x repeated y times."""
    single_string = str(x)
    repeat_string = single_string*y
    return repeat_string


def compare_strings(a, b):
    if a>b: return(repeat_string(b, a))
    return(repeat_string(a, b))


if __name__ == "__main__":
    test1 = "4 3"
    test2 = "7 7"
    test = test2
    test_input = map(int, input().split())
    print(compare_strings(*test_input))

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

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

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

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

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

Solution (Python):
arr = list(map(int, input().split()))
ans = ''
for i in range(max(arr)):
    ans += str(min(arr))
print(ans)

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

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

Solution (Python):
n = [int(e) for e in input().split(" ")]
if(n[0] == n[1]):
    print(str(n[0]) * n[0])
elif(n[0] < n[1]):
    print(str(n[0]) * n[1])
else:
    print(str(n[1]) * n[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()
a, b = int(a), int(b)
mini = str(min(a, b))
maxi = max(a,b)

print(mini*maxi)

Solution (Python):
N,M = map(int, input().split())
stN = ""
stM = ""
for i in range(0,N):
  stN = stN + str(M)
for j in range(0,M):
  stM = stM + str(N)
if stN <= stM:
  print(stN)
else:
  print(stM)

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

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

x = ""
y = ""

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

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

box = [x, y]
box.sort()

print(box[0])

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

a_array = []
for i in range(int(b)):
    a_array.append(a)
a_str = "".join(a_array)

b_array = []
for i in range(int(a)):
    b_array.append(b)
b_str = "".join(b_array)


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

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

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

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

Solution (Python):
import sys
a, b = [int(n) for n in sys.stdin.readline().split()]
l, h = min(a, b), max(a, b)
print(str(l)*h)

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

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

As = str(a) * b
Bs = str(b) * a

print(min(As, Bs))

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