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-----
4 3

-----Sample Output-----
3333

We have two strings 444 and 3333. Between them, 3333 is the lexicographically smaller.

Difficulty: introductory

Starter code:

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

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

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

print((f"{a}" * b, f"{b}" * a)[b <= a])

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


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

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

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

a,b = input().split()
print(max(int(a*int(b)),int(b*int(a))))

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

ans =[]
ans.append(a)
ans.append(b)
ans = sorted(ans)

anser = ''
for i in range(ans[1]):
  anser+=str(ans[0])
  
print (anser)

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

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

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


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

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

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

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

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


a,b = map(int,input().split())
# a,bを文字列化
a_str = str(a)
b_str = str(b)
# a*bとb*aを昇順でならべてリスト化
ab_list = sorted([a_str * b, b_str * a])
# リストの1番目を出力
print(ab_list[0])

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

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

if int(a_b[0]) >= int(b_a[0]):
    print(b_a)
else:
    print(a_b)

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

a1 = a * str(b)
a2 = b * str(a)
print(min(a1, a2))

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

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

if ab > ba:
    ans = ba
else:
    ans = ab

print(ans)

a,b = input().split()
ab = a*int(b)
ba = b*int(a)
s = max(len(ab),len(ba))

if s == len(ab) :
    print(ab)
else :
    print(ba)

def answer(a: int, b: int) -> str:
    return min(str(a) * b, str(b) * a)


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


def __starting_point():
    main()
__starting_point()

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

a,b = input().split()

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

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

def main():
	a, b = list(map(int, input().split()))
	f = str(a)*b
	s = str(b)*a
	ans = [f, s]
	ans.sort()
	return ans[0]


def __starting_point():
    print((main()))

__starting_point()

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

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


a, b = input().split()
str = ''
if int(a)<=int(b):
  for _ in range(int(b)):
    str += a
else:
  for _ in range(int(a)):
    str += b

print(str)

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

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

a, b = map(int, input().split())
aa = str(a)*b
bb = str(b)*a

aa = ''.join(aa)
bb = ''.join(bb)

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

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

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


a,b = input().split()

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

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

#整数同士のただの計算になってしまうため、型を指定する。
A = str(a) * b
B = str(b) * a

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

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

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


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

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

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

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

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

# 文字列として扱う
A = str(a)
B = str(b)

aaa = A * b
bbb = B * a

# 辞書順で小さい方を出力
lists = sorted([aaa, bbb])
print((lists[0]))


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)

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)

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

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

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

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

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


ls = list(map(int,input().split()))
print(str(min(ls))*max(ls))

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)

import numpy as np

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

A=(''.join([str(a)]*b))
B=(''.join([str(b)]*a))

print(min(A,B))

# 入力を受け取る
a,b = input().split()

#aをb個、bをa個並べたものを作る
str_a = a*int(b)
str_b = b*int(a)

#aとbを比較して、辞書順に小さい方を出力する
print(str_a if str_a < str_b else str_b)

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

a,b=map(int,input().split())
s=[a]*b
t=[b]*a
ab=map(str,s)
ba=map(str,t)
if a<=b:
    print(''.join(ab))
else:
    print(''.join(ba))

a,b = map(int,input().split())
L = [str(a)*b, str(b)*a]


L = sorted(L)
print(L[0])

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


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

from sys import setrecursionlimit, exit
setrecursionlimit(1000000000)

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

main()

a, b = map(int,input().split())
list = []
if a > b:
    for i in range(a):
        list.append(b)
else:
    for j in range(b):
        list.append(a)


list = [str(a) for a in list]
list = "".join(list)
print(list)

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

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

a,b = input().split()

print(sorted([a*int(b), b*int(a)])[0])

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

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

a = input()
a = a.split()
b = a[1]
a = a[0]
if a < b:
    d = a
    for c in range(int(b)-1):
        d = d + a
else:
    d = b
    for c in range(int(a)-1):
        d = d + b
print(int(d))

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

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

input_line=input().rstrip().split()
num1 = int(input_line[0])
num2 = int(input_line[1])
 
if (num1 > num2):
  print(str(num2)*num1)
elif (num1 < num2):
  print(str(num1)*num2)
elif (num1 == num2):
  print(str(num1)*num2)

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

def ans152(a:int, b:int):
    listab=[str(a)*b,str(b)*a]
    listab.sort()
    return int(listab[0])

print(ans152(a,b))

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

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

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

f = list(map(int, input().split()))
print(str(min(f)) * max(f))

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

list = []
def Repetition(x:str, y:str):
    list.append(x * int(y))
    return

Repetition(a, b)
Repetition(b, a)


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

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

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

print(ans)

x, y = list(map(int, input().split()))

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


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

A = str(a) * int(b)
B = str(b) * int(a)
print(min(A, B))

A,B = list(map(int,input().split()))
ans = [str(A)*B,str(B)*A]
ans.sort()
print((ans[0]))


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

my_list = []

if a > b:
    for i in range(a):
        my_list.append(b)
elif b > a:
    for i in range(b):
        my_list.append(a)
else:
    for i in range(a):
        my_list.append(b)
        
print(''.join([str(n) for n in my_list]))

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

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

# 整数a をb回繰り返してできる文字列と 整数b をa回繰り返してできる文字列のうち、
# 辞書順で小さい方を出力せよ。
# (2つの文字列が等しいときは、そのうちどちらかを出力せよ。)

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

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

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

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

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

lists = []
lists.append(str(a) * b)
lists.append(str(b) * a)
lists.sort()

print(lists[0])

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

# a, bを数値型として取得する
vals = list(map(int, input().split()))

# 小さい値の方を判定
min_val, max_val = sorted(vals)

# 小さい値の方をもう一方の値の分だけ繰り返し文字列結合させる
ret = ''
for i in range(max_val):
    ret += str(min_val)

# 結果を表示
print(ret)

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


a,b = list(map(int, input().split()))
c=str(a)*b
d=str(b)*a

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


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

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

print(min(str1, str2))

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)

n, m = list(map(int, input().split()))
if n > m:
    n, m = m, n
res = str(n)
print((res * m))


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

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

def dic():
    a_str, b_str = str(a), str(b)
    a_moji = a_str*b
    b_moji = b_str*a
    dic={a_moji:1,b_moji:2}
    dic = sorted(dic.items())


    return dic[0][0]

print(dic())


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

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

if int(a_b[0]) >= int(b_a[0]):
    print(b_a)
else:
    print(a_b)

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

if a <= b:
  for i in range(b):
    ans += str(a)
elif b < a:
  for i in range(a):
    ans += str(b)

print(ans)

num, num1 = input("").split()
num = int(num)
num1 = int(num1)

if num <= num1:
  for i in range(num1):
    print(num, end='')
else:
  for i in range(num):
    print(num1, end='')

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

#!/usr/bin/env python3
def main():
    a, b = list(map(int, input().split()))

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


def __starting_point():
    main()

__starting_point()

a,b=map(int, input().split())
A=str(a)*b
B=str(b)*a

print(A if A<=B else B)

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

lists = [str(a) * b, str(b) * a]
sort_list = sorted(lists)

print((sort_list[0]))


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

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

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

a, b = input().split()

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

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

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


a,b=sorted(input().split());print(a*int(b))

a, b = input().split()
ab = a * int(b)
ba = b * int(a)

if int(a) <= int(b):
    print(ab)
else:
    print(ba)

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

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

(x, y) = (a, b) if a<=b else (b, a)

for _ in range(y):
    print(x, end='')

# a, bを数値型として取得する
vals = list(map(int, input().split()))

# 昇順にソートして各値を取得
min_val, max_val = sorted(vals)

# 小さい値の方をもう一方の値の分だけ繰り返し文字列結合させる
ret = str(min_val)*max_val

# 結果を表示
print(ret)