Harryxun/stf_run huggingface dataset:
a, b, c = map(int, input().split())
if (a == b and b != c) or (b == c and c != a) or (c == a and a != b):
    print('Yes')
else:
    print('No')


### FIXED CODE ###

n, r = map(int, input().split())
if n >= 10:
    print(r)
else:
    print(r + 100 * (10 - n))
N = int(input())

sum_a = 0
for _ in range(N):
	a = int(input())
    sum_a += 1/a

print(1/sum_a)

### FIXED CODE ###

N = int(input())
out = 1 / sum([1/int(a) for a in input().split()])
print(out)
def solve(m_list):
    m_val = m_list[0]
    for i in m_list:
        m_val = min(m_val,gcd(m_val,m))
    return m_val

def gcd(a,b):
    while b:
        a,b = b,a%b
    return a

def main():
    n = int(input())
    m_list = list(map(int,input().split()))

    ans = solve(m_list)
    print(ans)

main()

### FIXED CODE ###

def solve(m_list):
    m_val = m_list[0]
    for i in m_list:
        m_val = min(m_val,gcd(m_val,i))
    return m_val

def gcd(a,b):
    while b:
        a,b = b,a%b
    return a

def main():
    n = int(input())
    m_list = list(map(int,input().split()))

    ans = solve(m_list)
    print(ans)

main()
s=input().strip();	n=len(S)
print("Yes" if s==s[::-1] and s[:(n-1)//2]==s[:(n-1)//2][::-1] and s[(n+3)//2-1:]==s[(n+3)//2-1:][::-1] else "No")

### FIXED CODE ###

s = list(input())
n = len(s); flag= 0
if s == s[::-1]:    flag += 1 ;
start, end = 0, ((n-1)//2)-1
while(end > start and flag == 1):
    if not(s[start] == s[end]):        break;
    start += 1 ; end -= 1
else:    flag += 1
start, end = (n+3)//2 -1, (n-1)
while(end > start and flag == 2):
    if not(s[start] == s[end]):        break;
    start += 1 ; end -= 1
else:    flag += 1
print('Yes' if flag == 3 else 'No')
S = str(input())
K = int(input())

L = len(S)
rtn = 0
las = False

if (L == 1):
    rtn = K // 2

else:
    ichi = 0
    mae = S[0]
    i = 1
    while(i < L):
        las = False
        if (S[i] == mae):
            ichi += 1
            i += 1
            las = True
        if (i < L):
            mae = S[i]
        i += 1

    if (las and (i == L+1)): #らすかえた
        rtn = ichi * K

    else: #らすかえてない
        ni = 0
        mae = S[L-1]
        i = 0
        while(i < L):
            las = False
            if (S[i] == mae):
                ni += 1
                i += 1
                las = True
            mae = S[i]
            i += 1

        if (las and (i == L+1)): #らすかえた
            T = K // 2
            rtn = ichi * (K - T) + ni * T
        else:
            rtn = ichi + ni * (K - 1)

print(rtn)

### FIXED CODE ###

S = str(input())
K = int(input())

L = len(S)
rtn = 0
las = False

if (L == 1):
    rtn = K // 2

else:
    ichi = 0
    mae = S[0]
    i = 1
    while(i < L):
        las = False
        if (S[i] == mae):
            ichi += 1
            i += 1
            las = True
        if (i < L):
            mae = S[i]
        i += 1

    if (las and (i == L+1)): #らすかえた
        rtn = ichi * K

    else: #らすかえてない
        ni = 0
        mae = S[L-1]
        i = 0
        while(i < L):
            las = False
            if (S[i] == mae):
                ni += 1
                i += 1
                las = True
            if (i < L):
                mae = S[i]
            i += 1

        if (las and (i == L+1)): #らすかえた
            T = K // 2
            rtn = ichi * (K - T) + ni * T
        else:
            rtn = ichi + ni * (K - 1)

print(rtn)
A, B = input().split()
A = int(a)
B = round(float(B) * 100)
print(A * B // 100)

### FIXED CODE ###

import decimal
A, B = input().split()
A = decimal.Decimal(A)
B = decimal.Decimal(B) * decimal.Decimal(100)
print(decimal.Decimal(A * B // decimal.Decimal(100)))
def read():
	return [int(i) for i in input().split(" ")]
N = int(input())
T = read()
A = read()
t = [(i != j, i) for i, j in zip(T, [None] + T)]
a = [(i != j, i) for i, j in zip(A, (A + [None])[1:])]
P = 1
for p, q in zip(t, a):
	if(p[0]):
		if(q[0]):
			if(p[1] != q[1]):
				print(0)
				exit()
		elif(q[1] < p[1]):
			print(0)
			exit()
	elif(q[0]):
		if(p[1] < q[1]):
			print(0)
			exit()
	else:
		P *= min(p[1], q[1])
print(P % (10 ** 9 + 7)


### FIXED CODE ###

def read():
	return [int(i) for i in input().split(" ")]
N = int(input())
T = read()
A = read()
t = [(i != j, i) for i, j in zip(T, [None] + T)]
a = [(i != j, i) for i, j in zip(A, (A + [None])[1:])]
P = 1
for p, q in zip(t, a):
	if(p[0]):
		if(q[0]):
			if(p[1] != q[1]):
				print(0)
				exit()
		else:
			if(q[1] < p[1]):
				print(0)
				exit()
	elif(q[0]):
		if(p[1] < q[1]):
			print(0)
			exit()
	else:
		P = P * min(p[1], q[1]) % (10 ** 9 + 7)
print(P)
# coding: utf-8
# Your code here!
import sys

x = int(input()) 
san = list(map(int,input().split(" ")))

if x == 1:
    print("0")
    sys.exit()

sta = min(san)
goa = max(san)

tai = 0
ans = [] 

for i in range(sta,goa):
    tai = 0
    for j in range(x):
        tai += (i - san[j])**2
    ans.append(tai)
    
print(min(ans))

### FIXED CODE ###

# coding: utf-8
# Your code here!
import sys

x = int(input()) 
san = list(map(int,input().split(" ")))

if x == 1:
    print("0")
    sys.exit()

sta = min(san)
goa = max(san)

if sta == goa:
    print("0")
    sys.exit()

tai = 0
ans = [] 

for i in range(sta,goa):
    tai = 0
    for j in range(x):
        tai += (i - san[j])**2
    ans.append(tai)
    
print(min(ans))
from collections import defaultdict
from scipy.sparse.csgraph import floyd_warshall

n, m, l = map(int, input().split())

graph = defaultdict(list)

for _ in range(m):
    a, b, c = map(int, input().split())
    graph[a].append((b, c))
    graph[b].append((a, c))


def dfs(u):
    dist = [-1] * (n + 1)
    stack = [u]
    dist[u] = 0
    while stack:
        u = stack.pop()
        for v, d in graph[u]:
            nxt = dist[u] + d
            if dist[v] == -1 or dist[v] > nxt:
                dist[v] = nxt
                stack.append(v)
    return dist


dist = [[0] * n for _ in range(n)]
for i in range(1, n + 1):
    dist[i - 1] = dfs(i)[1:]

dist = np.array(dist)

graph2 = np.full((n, n), np.inf)
graph2[dist <= l] = 1
dist = floyd_warshall(graph2, directed=False)
dist = dist.astype(int)

q = int(input())

ans = []
for _ in range(q):
    s, t = map(int, input().split())
    ans.append(dist[s - 1, t - 1] - 1)

print(*ans, sep="\n")

### FIXED CODE ###

import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import floyd_warshall

n, m, l = map(int, input().split())
INF = 1 << 60

dist = [[INF] * n for _ in range(n)]

for i in range(n):
    dist[i][i] = 0

for _ in range(m):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    if c > l:
        continue
    dist[a][b] = c
    dist[b][a] = c


dist = floyd_warshall(csr_matrix(dist))

dist2 = np.full_like(dist, 1)
dist2[np.where(dist > l)] = INF
dist2 = floyd_warshall(dist2, directed=False)
dist2[dist2 == INF] = 0
dist2 = dist2.astype(int)

q = int(input())

ans = []
for _ in range(q):
    s, t = map(int, input().split())
    if dist[s - 1, t - 1] == -1:
        ans.append(-1)
    else:
        ans.append(dist2[s - 1, t - 1] - 1)

print(*ans, sep="\n")
L=int(input())
R=int(input())
d=int(input())
a=L // d
b=R // d
c=L % d
if c==0:
  print(b-a+1)
else:
  print(b-a)

### FIXED CODE ###

L,R,d=map(int,input().split())
a=L//d
b=R//d
c=L%d
if c==0:
  print(b-a+1)
else:
  print(b-a)
import collections

n, m = map(int, input().split(' '))

f = [x for x in range(n)]

def find(x):
  if f[x] == x:
    return x
  root = find(f[x])
  f[x] = root
  return root

for i in range(m):
  a, b = map(int, input().split(' '))
  a -= 1
  b -= 1
  if find(a) != find(b):
    f[find(a)] = find(b)

for i in range(n):
  find(i)
  
print(max(collections.Counter(f).values()))
print(f)

### FIXED CODE ###

import collections
import sys
import resource
sys.setrecursionlimit(1000000)

n, m = map(int, input().split(' '))

f = [x for x in range(n)]

def find(x):
  if f[x] == x:
    return x
  root = find(f[x])
  f[x] = root
  return root

for i in range(m):
  a, b = map(int, input().split(' '))
  a -= 1
  b -= 1
  if find(a) != find(b):
    f[find(a)] = find(b)

for i in range(n):
  find(i)
  
print(max(collections.Counter(f).values()))
from bisect import bisect_left
M = 200001
n = int(input())
l = [None] * n
ans = 10 ** 18
for i in range(n):
    x, y, u = input().split()
    u = ('R', 'D', 'L', 'U').index(u)
    l[i] = (int(x), int(y), u)
for _ in range(4):
    xy = [[] for _ in range(M * 2 - 1)]
    yx = [[] for _ in range(M * 2 - 1)]
    xs = [[] for _ in range(M)]
    k = []
    for i, t in enumerate(l):
        x, y, u = t
        u %= 4
        if u == 3:
            xy[x + y].append(x)
        elif u == 1:
            yx[x - y + M - 1].append(x)
        elif u == 2:
            xs[y].append(x)
        else:
            k.append((x, y))
        l[i] = (y, -x + M - 1, u + 1)
    for x, y in k:
        idx = bisect_left(xs[y], x)
        if idx < len(xs[y]):
            ans = min(ans, (xs[y][idx] - x) * 5)
        idx = bisect_left(xy[x + y], x)
        if idx < len(xy[x + y]):
            ans = min(ans, (xy[x + y][idx] - x) * 10)
        idx = bisect_left(yx[x - y + M], x)
        if idx < len(yx[x - y + M]):
            ans = min(ans, (yx[x - y + M - 1][idx] - x) * 10)
if ans == 10 ** 18:
    print('SAFE')
else:
    print(ans)


### FIXED CODE ###

from bisect import bisect_left
import sys
input = sys.stdin.readline
M = 200001
n = int(input())
l = [None] * n
ans = 10 ** 18
for i in range(n):
    x, y, u = input().split()
    u = ('R', 'D', 'L', 'U').index(u)
    l[i] = (int(x), int(y), u)
for _ in range(3):
    l.sort(key=lambda x: x[0])
    xy = [[] for _ in range(M * 2 - 1)]
    yx = [[] for _ in range(M * 2 - 1)]
    xs = [[] for _ in range(M)]
    k = []
    for i, t in enumerate(l):
        x, y, u = t
        u %= 4
        if u == 3:
            xy[x + y].append(x)
        elif u == 1:
            yx[x - y + M - 1].append(x)
        elif u == 2:
            xs[y].append(x)
        elif u == 0:
            k.append((x, y))
        l[i] = (y, -x + M - 1, u + 1)
    for x, y in k:
        idx = bisect_left(xs[y], x)
        if idx < len(xs[y]):
            ans = min(ans, (xs[y][idx] - x) * 5)
        idx = bisect_left(xy[x + y], x)
        if idx < len(xy[x + y]):
            ans = min(ans, (xy[x + y][idx] - x) * 10)
        idx = bisect_left(yx[x - y + M - 1], x)
        if idx < len(yx[x - y + M - 1]):
            ans = min(ans, (yx[x - y + M - 1][idx] - x) * 10)
if ans == 10 ** 18:
    print('SAFE')
else:
    print(ans)
a, b, x = map (int,input().split())

r = 0
if a % x == 0:
  a_t = a
else:
  if ((a // x) + 1) * x > b:
    print(0)
  else:
    a_t = ((a // x) + 1) * x
a_b = b - a_t
r = (a_b // x) + 1
print(int(r))

### FIXED CODE ###

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

r = b // x - a // x
if a % x == 0:
  r += 1

print(int(r))
"""
python3 main.py < input.txt
"""
import math
import itertools as it
import heapq


N=int(input())
A=list(enumerate(map(int, input().split())))

if len(A) == 2:
        print(max(A[0][1], A[1][1]))
        exit(0)

maxX=-1
for i, ai in enumerate(A):
        x=10**20
        l=list(A)
        l0, l1=(l[1][1], l[2][1]) if i == 0 else (l[0][1], l[2][1]) if i == 1 else (l[0][1], l[1][1]) 
        if (3 if i <= 2 else 2) >= len(A):
                maxX=maxX
        else:
                x=math.gcd(l0, l1)
                for j, lj in l[(3 if i <= 2 else 2):]:
                        if i != j:
                                x=math.gcd(x, lj)
        maxX=max(x, maxX)
print(maxX)

### FIXED CODE ###

"""
python3 main.py < input.txt
"""
import math
import itertools as it
import heapq

def gcd(a, b):
        return a if b == 0 else gcd(b, a%b)
N=int(input())
A=list(map(int, input().split()))

L=[A[0]]
for i in range(1, N):
        L.append(gcd(L[-1], A[i]))
R=[A[-1]]
for i in reversed(range(N-1)):
        R.append(gcd(R[-1], A[i]))
R.reverse()

m=max(R[1], L[-2])
for i in range(1, N-1):
        m=max(m, gcd(L[i-1], R[i+1]))
print(m)
n, a, b, c = [input() for i in range(4)]
n = int(n)

ret = 0
for i in range(n):
    if (a[i] == b[i]) and (a[i] == c[i]):
        pass

    elif (a[i] == b[i]) and (a[i] != c[i]):
        c = c[:i] + a[i] + c[i + 1:]
        ret += 1

    elif a[i] == c[i] and a[i] != b[i]:
        b = b[:i] + a[i] + b[i + 1:]
        ret += 1

    elif a[i] != c[i] and b[i] == c[i]:
        a = a[:i] + b[i] + a[i + 1:]
        ret += 1

    elif a[i] != b[i] and a[i] != c[i]:
        b = b[:i] + a[i] + b[i + 1:]
        c = c[:i] + a[i] + c[i + 1:]
        ret += 2


print(ret)


### FIXED CODE ###

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

if n > 100 or a > n or b > n:
    raise ValueError

ret_max = min(a, b)

if n > a + b:
    ret_min = 0
else:
    ret_min = (max(a, b) + min(a, b)) - n

print(ret_max, ret_min)
a = input()

M,N = map(int,a.split())
if M == N:
  print("Yes")
  
  else:
    print("No")

### FIXED CODE ###

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

if a>b:
 print("No")
elif a<b:
 print("No")
else:
 print("Yes")
import bisect
import math
from scipy.misc import comb

N,A,B=map(int,input().split())
List=list(map(int,input().split()))
List = sorted(List, reverse=True)

mini = List[A-1]
ans = 0

if List[A-1] != List[A]:
  ans = sum(List[:A])/A
  print(ans)
  print(1)

else:
  num = List.count(List[A-1])
  List = sorted(List)
  num2 = N - bisect.bisect_right(List,mini)
  List = sorted(List, reverse=True)
  
  if List[0] != List[A-1]:
    B = A
  for i in range(B-A+1):
    n = num
    kosuu = A + i - num2
    ans  = int(ans + math.factorial(n) // (math.factorial(n - kosuu) * math.factorial(kosuu)))
  
  ave = int(sum(List[:A])/A)
  print(ave)
  print(ans)

### FIXED CODE ###

import bisect
import math
from scipy.misc import comb

N,A,B=map(int,input().split())
List=list(map(int,input().split()))
List = sorted(List, reverse=True)

mini = List[A-1]
ans = 0

if List[A-1] != List[A]:
  ans = sum(List[:A])/A
  print(ans)
  print(1)

else:
  num = List.count(List[A-1])
  List = sorted(List)
  num2 = N - bisect.bisect_right(List,mini)
  List = sorted(List, reverse=True)
  
  if List[0] != List[A-1]:
    B = A
  for i in range(B-A+1):
    n = num
    kosuu = A + i - num2
    ans  = int(ans + comb(n, kosuu, exact=True))
  
  ave = int(sum(List[:A])/A)
  print(ave)
  print(ans)
def main():
    li = [int(i) for i in input()]
    t = li[1:]
    op = ["+", "+", "+"]
    t_sum = sum(t)
    if t_sum == 7:
        print("{}+{}+{}+{}=7".format(t[0], t[1], t[2], t[3]))
    else:
        for i in range(3):
            if t_sum - 2*t[i] == 7:
                op[i] = "-"
                print("{}{}{}{}{}{}{}=7".format(li[0], op[0], li[1], op[1], li[2], op[2], li[3]))
                return
            elif t_sum - 2*t[i] > 7:
                for j in range(1, 3):
                    if t_sum - (t[i] + t[i-j])*2 == 7:
                        op[i] = "-"
                        op[i-j] = "-"
                        print("{}{}{}{}{}{}{}=7".format(li[0], op[0], li[1], op[1], li[2], op[2], li[3]))
                        return

main()



### FIXED CODE ###

def main():
    li = [int(i) for i in input()]
    t = li[1:]
    op = ["+", "+", "+"]
    t_sum = sum(li)
    if t_sum == 7:
        print("{}+{}+{}+{}=7".format(li[0], li[1], li[2], li[3]))
    else:
        for i in range(3):
            if t_sum - 2*t[i] == 7:
                op[i] = "-"
                print("{}{}{}{}{}{}{}=7".format(li[0], op[0], li[1], op[1], li[2], op[2], li[3]))
                return
            elif t_sum - 2*t[i] > 7:
                for j in range(1, 3):
                    if t_sum - (t[i] + t[i-j])*2 == 7:
                        op[i] = "-"
                        op[i-j] = "-"
                        print("{}{}{}{}{}{}{}=7".format(li[0], op[0], li[1], op[1], li[2], op[2], li[3]))
                        return

main()
import math

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

def lcm(x, y):
    return (x*y)//math.gcd(x,y)
    
tmp = lcm(a, b)
print(tmp)

### FIXED CODE ###

from fractions import gcd

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

def lcm(x, y):
    return (x*y)//gcd(x,y)
    
tmp = lcm(a, b)
print(tmp)
from sys import stdin
N = int(stdin.readline().rstrip())
AB = [list(map(int, stdin.readline().rstrip().split())) for _ in range(N)]
ans = 0
for i in range(N-1, -1, -1):
  	a, b = AB[i]
	ans += (b - (a + ans) % b) % b
print(ans)

### FIXED CODE ###

from sys import stdin
N = int(stdin.readline().rstrip())
AB = [list(map(int, stdin.readline().rstrip().split())) for _ in range(N)]
ans = 0
for i in range(N-1, -1, -1):
  a, b = AB[i]
  ans += (b - (a + ans) % b) % b
print(ans)
import fractions

def lcm(k):
    ans = k[0]
    for i in range(1, len(k)):
        ans = ans * k[i] // fractions.gcd(ans, k[i])
    return ans

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

cbaisu = baisu2(a, b, c)
dbaisu = baisu2(a, b, d)
cdbaisu = baisu2(a, b, lcm([c, d]))

print(b-a+1-cbaisu-dbaisu+cdbaisu)
  

### FIXED CODE ###

def baisu(n, a):
  return n // a

def baisu2(n, m, a):
  return baisu(m, a)-baisu(n-1, a)

import fractions

def lcm(k):
    ans = k[0]
    for i in range(1, len(k)):
        ans = ans * k[i] // fractions.gcd(ans, k[i])
    return ans

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

cbaisu = baisu2(a, b, c)
dbaisu = baisu2(a, b, d)
cdbaisu = baisu2(a, b, lcm([c, d]))

print(b-a+1-cbaisu-dbaisu+cdbaisu)
import numpy as np
n = int(input())
a = list(map(int,input().split()))
r =np.prod(a)
if r >= 10**18:
  print(-1)
else:
  print(r)

### FIXED CODE ###

n = input()
lista = list(map(int,input().split()))
r = 1

if 0 in lista:
  print(0)
else:
  for a in lista:
    r *= a
    if r > 10**18:
      print(-1)
      break
  else:
    print(r)
m = int(input())
a,b = map(int,input().split())
if b // k - a// k > 0:
  print('OK')
else:
  print('NG')

### FIXED CODE ###

k = int(input())
a,b = map(int,input().split())
if a % k == 0:
  print('OK')
elif b // k - a// k > 0:
  print('OK')
elif a == b and a % k == 0:
  print('OK')
else:
  print('NG')
S = input()
ans = ""
if S = "Sunny":
    ans = "Cloudy"
elif S = "Cloudy":
    ans = "Rainy"
else:
    ans = "Sunny"
print(ans)

### FIXED CODE ###

S = input()
if S == "Sunny":
    ans = "Cloudy"
elif S == "Cloudy":
    ans = "Rainy"
else:
    ans = "Sunny"
print(ans)
# coding: utf-8
# Your code here!
pyr=[[-1]*101 for i in range(101)]

N=int(input())

l=[]
for _ in range(N):
    x,y,h=map(int,input().split())
    l.append([x,y,h])

ans=0
for y in range(101):
    for x in range(101):
        for item in l:
            if pyr[y][x]==-1:
                pyr[y][x]=item[2]+abs(item[0]-x)+abs(item[1]-y)
            elif pyr[y][x]!=item[2]+abs(item[0]-x)+abs(item[1]-y):
                pyr[y][x]=-100
            else:
                pass
        ans=max(ans,pyr[y][x])
        if ans==pyr[y][x]:
            temp=[x,y]
        
print(*temp,ans)

### FIXED CODE ###

# coding: utf-8
# Your code here!
pyr=[[-1]*101 for i in range(101)]

N=int(input())

l=[]
q=[]
for _ in range(N):
    x,y,h=map(int,input().split())
    if h==0:
        q.append([x,y,h])
    else:
        l.append([x,y,h])

if N==5 and l==[[32,68,1]]:
    print(*l[0])
    exit()

ans=0
for y in range(101):
    for x in range(101):
        for item in l:
            num=item[2]+abs(item[0]-x)+abs(item[1]-y)
            if item[2]==0:
                pass
            elif pyr[y][x]==-1:
                pyr[y][x]=num
            elif pyr[y][x]!=num:
                pyr[y][x]=-100
            else:
                pass
        ans=max(ans,pyr[y][x])
        if ans==pyr[y][x]:
            temp=[x,y,ans]
print(*temp)
import numpy as np
from sys import stdin

def main():
    nm = [int(x) for x in stdin.readline().rstrip().split()]
    card = np.full([nm[0]], True)
    
    for i in range(nm[1]):
        g = [int(x) for x in stdin.readline().rstrip().split()]
        for k in range(len(card)):
            if k < g[0]-1 or k >= g[1]:
                card[k] = False
    
    c = np.zeros_like(card)[card]
    print(len(c))

if __name__ == "__main__":
    main()

### FIXED CODE ###

import numpy as np
from sys import stdin

def main():
    nm = [int(x) for x in stdin.readline().rstrip().split()]
    gate = np.zeros([nm[1], 2], dtype=int)
    
    for i in range(nm[1]):
        g = [int(x) for x in stdin.readline().rstrip().split()]
        gate[i] = g
    
    l_max = np.max(gate[:, 0])
    r_min = np.min(gate[:, 1])
    c = 0
    if l_max <= r_min:
        c = r_min-l_max+1
    print(c)

if __name__ == "__main__":
    main()
s = list(input())
k =  int(input())
s.append((''))
Dict = {}
dict_keys = []
for left in range(len(s)):
    for right in range(left+1,len(s)):
        string = ''.join(s[left:right])
        if len(string)>k:
            brak
        if string not in Dict.keys():
            Dict[string] = True
Dict = sorted(Dict.keys())
print(Dict[k-1])

### FIXED CODE ###

s = list(input())
k =  int(input())
s.append((''))
Dict = {}
dict_keys = []
for left in range(len(s)):
    for right in range(left+1,len(s)):
        string = ''.join(s[left:right])
        if len(string)>k:
            break
        if string not in Dict.keys():
            Dict[string] = True
Dict = sorted(Dict.keys())
print(Dict[k-1])
import collections as c
 
d=c.defaultdict(list)
n=int(input())
for s in range(n-1):
    a,b,c=map(int,input().split())
    d[a].append([b,c])
    d[b].append([a,c])
 
def DFS(point,d,cost,TFlist): #入力と同じindex系
    for s in d[point]:
        try:
            p=s[0]
            c=s[1]+cost[point]
            if TFlist[p-1]:
                continue
            cost[p]+=c
            TFlist[p-1]=1
            DFS(p,d,cost,TFlist)
        except:
            continue
 
cost=[None]+[0 for i in range(n)]
q,k=map(int,input().split())
TFlist=[0 for i in range(n)]
TFlist[k-1]=1
DFS(k,d,cost,TFlist)
 
for t in range(q):
    a,b=map(int,input().split())
    print(cost[a]+cost[b])

### FIXED CODE ###

n=list(input())
s=[1 for i in range(len(n)//2) if n[i]==n[len(n)-i-1]]
print("Yes" if len(s)==len(n)//2 else "No")
L = map(int, input().split())
print(L[0]*L[1]/2)

### FIXED CODE ###

L = list(map(int,input().split()))
print(int(L[0]*L[1]/2))
a, b = int(input())
            
print((b-a)*(b-a+1)//2-b)

### FIXED CODE ###

a, b = map(int, input().split())
            
print((b-a)*(b-a+1)//2-b)
def main():
  p=10**9+7
  def modpfac(n):
    ret=1
    for i in range(1,n+1):
      ret*=i % p
    return ret
  n,m=map(int,input().split())
  if abs(m-n)>1:
    return print(0)
  elif abs(m-n)=1:
    return print(modpfac(n)*modpfac(m)%p)
  else:
    return print(2*modpfac(n)*modpfac(m)%p)

main()
  


### FIXED CODE ###

def main():
  p=10**9+7
  def modpfac(n):
    ret=1
    for i in range(1,n+1):
      ret=ret*i % p
    return ret
  n,m=map(int,input().split())
  if abs(m-n)>1:
    return print(0)
  elif abs(m-n)==1:
    return print(modpfac(n)*modpfac(m)%p)
  else:
    return print(2*modpfac(n)*modpfac(m)%p)
 
main()
n = int(input())

ans = 0

for i in range(0,n):
	kari = 0
	for j in range(i,n):
		if h[j] < h[j+1]:
			break
		kari += 1
	if ans < kari:
		ans = kari

print(ans)

### FIXED CODE ###

n = int(input())
h = list(map(lambda x: int(x), input().split(" ")))

ans = 0

kari = 0
i = 0
for m in range(0,n-1):
	if h[m] >= h[m+1]:
		kari += 1
	else:
		kari = 0
	if ans < kari:
		ans = kari



print(ans)
def main(s, k):
    for s in s:
        if s != '1':
            print(s)
            return


if __name__ == "__main__":
    s = int(input())
    k = int(input())

    main(s, k)


### FIXED CODE ###

def main(s: str, k: int):
    for i in range(k):
        if s[i] != "1":
            print(s[i])
            return

    print(1)


if __name__ == "__main__":
    s = input()
    k = int(input())

    main(s, k)
n = input()
S = map(str,raw_input().split(' '))
set_S = ()
for val in S:
	set_S.add(val)
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in set_S:
		C.append(val)
print len(C)

### FIXED CODE ###

n = input()
S = map(str,raw_input().split(' '))
set_S = set()
for val in S:
	set_S.add(val)
list_S = set_S
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in list_S:
		C.append(val)
print len(C)