Harryxun/stf_run huggingface dataset:
n=int(input())
ws=[]
for i in range(n):
  w=input()
  if w in ws or w[0]!=ws[i-1][-1]:
    print("No")
    break
else:
  print("Yes")

### FIXED CODE ###

n=int(input())
ws=[input()]
for i in range(1,n):
  w=input()
  if w in ws or w[0]!=ws[i-1][-1]:
    print("No")
    break
  ws.append(w)
else:print("Yes")
a,b = ((x) for x in input().split(" "))
int(c) = int(a) - int(b)
if c > 0:
    print ( c )
else:
    print('0')

### FIXED CODE ###

X, t = map(int, input().split())
x = X - t
 
if x > 0:
    print(x)
else:
    print(0)
s = input()
s = s + "*"
ans = "Good"
for i in range(len(s)):
    if s[i] == s[i+1]:
        ans = "Bad"
        break
print(ans)

### FIXED CODE ###

s = input()
s = s + "*"
ans = "Good"
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans = "Bad"
        break
print(ans)
import math
import collections
 
N = int(input())
prime_number = False
ans = 0
 
def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
      global prime_number
      prime_number = True
      return
    else:
        factor.append(n)
        return factor
 
list_num = trial_division(N)
 
if prime_number:
  ans = 1
else:
  if 1 in list_num:
    prime_list = list_num[:-1]
    counter = collections.Counter(prime_list)
    for key,val in counter.items():
      temp = val
      for i in range(1,val+1):
        if temp-i > 0:
          temp -= i
          ans += 1
        elif temp-i == 0:
          temp -= i
          ans += 1
          break
        else
          break
    
print(ans)

### FIXED CODE ###

import math
import collections
 
N = int(input())
prime_number = False
ans = 0
 
def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
      global prime_number
      prime_number = True
      return
    else:
        factor.append(n)
        return factor

list_num = trial_division(N)

if N == 1:
  ans = 0
elif prime_number:
  ans = 1
else:
  if 1 in list_num:
    prime_list = list_num[:-1]
  else:
    prime_list = list_num
  counter = collections.Counter(prime_list)
  for key,val in counter.items():
    temp = val
    for i in range(1,val+1):
      if temp-i > 0:
        temp -= i
        ans += 1
      elif temp-i == 0:
        temp -= i
        ans += 1
        break
      else:
        break
    
print(ans)
# Exercício 15.4-3 - Cormen 3 ed.

s = input()
t = input()
# s = "a" * 3000
# t = "a" * 2980
n = len(s) + 1
m = len(t) + 1
c = [[-1] * (m) for x in [-1] * (n)]

def lcsLengthMemoized(i, j):
    global c
    if c[i][j] != -1:
        return c[i][j]
    if i == 0 or j == 0:
        c[i][j] = 0
        return c[i][j]
    global s, t
    if s[i - 1] == t[j - 1]:
        c[i][j] = lcsLengthMemoized(i - 1, j - 1) + 1
        return c[i][j]
    top_p = lcsLengthMemoized(i - 1, j)
    left_p = lcsLengthMemoized(i, j - 1)
    c[i][j] = max(top_p, left_p)
    return c[i][j]
    
def getLCS(i, j, lcs=""):
    global c
    if c[i][j] == 0:
        return lcs
    global s, t
    if s[i - 1] == t[j - 1]: # volta uma linha e uma coluna
        lcs += getLCS(i - 1, j - 1, lcs)
        lcs += s[i - 1]
        return lcs
    elif c[i - 1][j] > c[i][j - 1]: # volta uma linha na mesma coluna
        lcs += getLCS(i - 1, j, lcs)
    else: # volta uma coluna na mesma linha
        lcs += getLCS(i, j - 1, lcs)
    return lcs

lcsLengthMemoized(n - 1, m - 1)
print(getLCS(n - 1, m - 1))

### FIXED CODE ###

def main():
  import numpy as np

  s = np.array(list(input()), np.unicode)
  sl = len(s)
  t = np.array(list(input()), np.unicode)
  tl = len(t)
  equal = (s[:, None] == t[None, :])

  dp = [np.zeros(tl + 1, np.int32)]
  for i in range(sl):
    tmp = dp[-1].copy()
    np.maximum(tmp[1:], tmp[:-1] + equal[i], out=tmp[1:])
    np.maximum.accumulate(tmp, out=tmp)
    dp.append(tmp)

  answer = ''
  while sl > 0 and tl > 0:
    if s[sl - 1] == t[tl - 1]:
      sl -= 1
      tl -= 1
      answer += s[sl]
      continue

    if dp[sl - 1][tl] > dp[sl][tl - 1]:
      sl -= 1
    else:
      tl -= 1

  print(answer[::-1])

if __name__ == '__main__':
  main()
_ = input()
p = [int(x) for x in input().split()]

lenp = len(p)
cnt = 0
for i in range(lenp):
    if p[i] == i + 1:
        cnt += 1
        if i != lenp:
            p[i], p[i+1] = p[i+1], p[i]
else:
    print(cnt)

### FIXED CODE ###

n = int(input())
p = [int(x) for x in input().split()]

cnt = 0
for i in range(n):
    if p[i] == i + 1:
        cnt += 1
        if i != n - 1:
            p[i], p[i+1] = p[i+1], p[i]
else:
    print(cnt)
import bisect

n, m = map(int, input().split())
f_1 = []
t_n = []
jedge = 0
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        f_1.append(b)
    if b == n:
        t_n.append(a)
f_1.sort()
t_n.sort()
for i in range(len(f_1)):
    p = bisect.bisect_left(t_n, f_1[i])
    if f_1[i] == t_n[p+1]:
        jedge = 1
        break
if jedge == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


### FIXED CODE ###

import bisect

n, m = map(int, input().split())
f_1 = []
t_n = []
jedge = 0
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        f_1.append(b)
    if b == n:
        t_n.append(a)
f_1.sort()
t_n.sort()
for i in range(len(f_1)):
    p = bisect.bisect_left(t_n, f_1[i])
    if p < len(t_n)-1 and f_1[i] == t_n[p]:
        jedge = 1
        break
    elif p == len(t_n)-1 and f_1[i] == t_n[p]:
        jedge = 1
        break
if jedge == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
s=str(input())
q=int(input())
now = 0
mae,usiro="",""
for _ in range(q):
  lis = list(map(str,input().split()))
  if int(lis[0]) == 1:
    now = (now+1)%2
  else:
    if (int(lis[1])+now)%2 == 1:
      mae = lis[2]+mae
    else:
      usiro= usiro +lis[2]
s = mae+s+usiro
if now ==0:
  print(s)
else:
  print(s[::-1])
    
  


### FIXED CODE ###

s =str(input())
if "A" not in s or "B" not in s:
  print("No")
else:
  print("Yes")
def main():
    n = int(input())
    a = [int(i) for i in input().split()]
    
    max_num = max(a)
    dif = 99999.
    for num in a:
        if(num != max_num and dif > abs((max_num/2) - num)):
            dif = abs((max_num/2) - num)
            ansnum = num
            
    print("{} {}".format(max_num, ansnum))
        
if __name__=="__main__":
    main()

### FIXED CODE ###

def main():
    n = int(input())
    a = [int(i) for i in input().split()]
    
    max_num = max(a)
    dif = 10**10
    ansnum = 0
    for num in a:
        if(num != max_num and dif > abs((max_num/2) - num)):
            dif = abs((max_num/2) - num)
            ansnum = num
            
    print("{} {}".format(max_num, ansnum))
        
if __name__=="__main__":
    main()
def dfs(node, dis, adj_list):

    for next, d in adj_list[node]:
        if dis[next] == float("inf"):
            dis[next] = dis[node] + d
            dfs(next, dis, adj_list)

    return


n = int(input())

adj_list = [[] for _ in range(n)]

for i in range(n - 1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    adj_list[a].append([b, c])
    adj_list[b].append([a, c])

q, k = map(int, input().split())

k -= 1
dis = [float("inf")] * n
dis[k] = 0
dfs(k, dis, adj_list)

for i in range(q):
    x, y = map(int, input().split())
    x -= 1
    y -= 1
    print(dis[x] + dis[y])


### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)


def dfs(node, dis, adj_list):

    for next, d in adj_list[node]:
        if dis[next] == float("inf"):
            dis[next] = dis[node] + d
            dfs(next, dis, adj_list)

    return


n = int(input())
adj_list = [[] for _ in range(n)]


for i in range(n - 1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    adj_list[a].append([b, c])
    adj_list[b].append([a, c])

q, k = map(int, input().split())

k -= 1
dis = [float("inf")] * n
dis[k] = 0
dfs(k, dis, adj_list)

for i in range(q):
    x, y = map(int, input().split())
    x -= 1
    y -= 1
    print(dis[x] + dis[y])
from math import factorial
N,K = map(int, input().split())
mod = 10**9 + 7
for i in range(1,K+1):
    comb = int(factorial(K-1) / factorial(i-1) / factorial(K-i))
    try:
        sec = int(factorial(N-K+1) / factorial(N-K-i+1) / factorial(i))
    except ValueError:
        sec = 1
    print((comb * sec)%mod)

### FIXED CODE ###

from math import factorial
N,K = map(int, input().split())
mod = 10**9 + 7
def com(n,r):
    if n<r:
        return 0
    return int(factorial(n) // factorial(r) // factorial(n-r))
for i in range(1,K+1):
    comb = com(N-K+1,i)
    sec = com(K-1,i-1)
    print((comb * sec)%mod)
n, a, b = map(int, input().split())

ans = 0

for i in range(1, n + 1):
    num = i
    total = 0
    while num != 0:
        total += num % 10
        num //= 10

    if a <= total <= b:
        ans += i

print(ans)


### FIXED CODE ###

a, b, c, d = map(int, input().split())
l = a + b
r = c + d

if l == r:
    answer = 'Balanced'
elif l > r:
    answer = 'Left'
else:
    answer = 'Right'

print(answer)
a,b,n = map(int,input().split())
ans = 0
ans = max(int(a*n/b) - a*int(n/b),ans)
for k in range(1,n//(b-1)+1):
    ans = max(int(a*(k*b-1)/b) - a*int((k*b-1)/b),ans)
    if ans == a:
        print(ans)
        break
if ans != a:
    print(ans)

### FIXED CODE ###

a,b,n = map(int,input().split())
ans = 0
ans = max(int(a*n/b) - a*int(n/b),ans)
if b == 1:
    print(0)
else:
    for k in range(1,n//(b-1)+1):
        ans = max(int(a*(k*b-1)/b) - a*int((k*b-1)/b),ans)
        if ans == a:
            print(ans)
            break
    if ans != a:
        print(ans)
N = int(input())
ListH = list(map(int,input().split()))
result = 1
for i in range(N):
    for k in range(i):
        out = False
        if k >= 0:
            if ListH[k] < ListH[i]:
                out = True
    if not out :
        result += 1
print(result)

### FIXED CODE ###

a, b = map(int,input().split())
if a > b:
  c = a
  a-=1
else:
  c = b
  b-=1
if a > b:
  c += a
else:
  c += b
print(c)
b = input()

if b==A:
    print("T")
elif b==T:
    print("C")
elif b==C:
    print("G")
elif b==G:
    print("C")

### FIXED CODE ###

b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b == "G":
    print("C")
N, K, Q = map(int, input().split())
N_list = [0] * N

for _ in range(Q):
  A = int(input())
  A -= 1
  N_list[A] += 1

for i in N_list:
  if N_list[i] - Q + K > 0:
    print('Yes')
  else:
    print('No')


### FIXED CODE ###

N, K, Q = map(int, input().split())
N_list = [0] * N

for _ in range(Q):
  A = int(input())
  A -= 1
  N_list[A] += 1

for n in N_list:
  if n + K - Q > 0:
    print('Yes')
  else:
    print('No')
A = int(input())
B = int(input())
kuchi = 1
taps = 0 
while kuchi < B:
    taps +=1
    kuchi +=A-1
print(taps)

### FIXED CODE ###

A,B = map(int, input().split(' '))
kuchi = 1
taps = 0 
while kuchi < B:
    taps +=1
    kuchi +=A-1
print(taps)
X, Y, A, B, C = [int(i) for i in input().split()]
P = sorted([int(i) for i in input().split()])[-X:]
Q = sorted([int(i) for i in input().split()])[-Y:]
R = sorted([int(i) for i in input().split()])[::-1]
heapq.heapify(P)
heapq.heapify(Q)
i = 0
while(True):
    if P[0] >= R[i] and Q[0] >= R[i]:
        break
    if P[0] > Q[0]:
        if Q[0] < R[i]:
            heapq.heappop(Q)
            heapq.heappush(Q, R[i])
    else:
        if P[0] < R[i]:
            heapq.heappop(P)
            heapq.heappush(P, R[i])
    i += 1
    if i == len(R):
        break
print(sum(P) + sum(Q))

### FIXED CODE ###

import heapq
 
X, Y, A, B, C = [int(i) for i in input().split()]
P = sorted([int(i) for i in input().split()])[-X:]
Q = sorted([int(i) for i in input().split()])[-Y:]
R = sorted([int(i) for i in input().split()])[::-1]
heapq.heapify(P)
heapq.heapify(Q)
i = 0
while(True):
    if P[0] >= R[i] and Q[0] >= R[i]:
        break
    if P[0] > Q[0]:
        if Q[0] < R[i]:
            heapq.heappop(Q)
            heapq.heappush(Q, R[i])
    else:
        if P[0] < R[i]:
            heapq.heappop(P)
            heapq.heappush(P, R[i])
    i += 1
    if i == len(R):
        break
print(sum(P) + sum(Q))
N = input()
N = int(N)
name = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

S = 1
i = 0
Sum = 0
while Sum<N:
    S *= 26
    Sum += S
    i = i+1

ans = []
for j in range(i):
  	N -= 1
    r = N%26
    ans.insert(0, name[r])
    N = N//26

ans = ''.join(ans)
print(ans)




### FIXED CODE ###

N = input()
N = int(N)
name = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

S = 1
i = 0
Sum = 0
while Sum<N:
    S *= 26
    Sum += S
    i = i+1


ans = []
for j in range(i):
    N -= 1
    r = N%26
    ans.insert(0, name[r])
    N = N//26

ans = ''.join(ans)
print(ans)
n, k = map(int, input().split())
A = list(map(int, input().split()))

Town = []
#まだ訪れていない町は-1
rec = [-1] * (n+1)
idx = 1
#すべての町を訪れるまで
while (rec[idx] == -1):
    rec[idx] = len(Town)
    Town.append(idx)
    idx = A[idx-1]

Exce = rec.index(idx)
Cycl = len(Town) - Exce

if Cycl > k:
    print(Town[k])
else:
    k -= Exce
    k %= Cycl
    print(Town[Exce+k])

### FIXED CODE ###

n, k = map(int, input().split())
A = list(map(int, input().split()))

Town = []
#まだ訪れていない町は-1
rec = [-1] * (n+1)
idx = 1
#周期までループをまわす
while (rec[idx] == -1):
    rec[idx] = len(Town)
    Town.append(idx)
    idx = A[idx-1]

#周期前
Exce = rec[idx]
#周期内
Cycl = len(Town) - Exce

if Exce > k:
    print(Town[k])
else:
    Warp = (k - Exce) % Cycl
    print(Town[Exce+Warp])
from collections import defaultdict
vertices, edges = map(int, input().split(" "))
connect = defaultdict(set)
for i in range(vertices):
    a, b = map(int, input().split(" "))
    connect[a] |= {b}
    connect[b] |= {a}

answer = 0
queue = [[set(), 1]]
while queue:
    visited, now = queue.pop()
    visited |= {now}
    # print(visited, now, need_visit)
    if len(visited) == vertices:
        answer += 1
    else:
        for conn in connect[now]:
            if conn not in visited:
                queue.append([visited | {conn}, conn])
        # print(visited, now, need_visit)

print(answer)

### FIXED CODE ###

from collections import defaultdict
vertices, edges = map(int, input().split(" "))
connect = defaultdict(set)
for i in range(edges):
    a, b = map(int, input().split(" "))
    connect[a] |= {b}
    connect[b] |= {a}

answer = 0
queue = [[set(), 1]]
while queue:
    visited, now = queue.pop()
    visited |= {now}
    # print(visited, now, need_visit)
    if len(visited) == vertices:
        answer += 1
    else:
        for conn in connect[now]:
            if conn not in visited:
                queue.append([visited | {conn}, conn])
        # print(visited, now, need_visit)

print(answer)
from queue import Queue

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

  edges = [[] for _ in range(m)]

  for _ in range(m):
    a, b = map(lambda x: int(x) - 1, input().split())
    edges[a].append(b)
    edges[b].append(a)

  visited = {}

  q = Queue()
  q.put(0)

  while q.qsize() > 0:
    current = q.get()
    for nxt in edges[current]:
      if nxt not in visited:
        visited[nxt] = current
        q.put(nxt)

  if len(visited) == n:
    print("Yes")
    for i in range(1, n):
      print(visited[i] + 1)
  else:
    print("No")


main()


### FIXED CODE ###

from queue import Queue
import sys

sys.setrecursionlimit(10 ** 6)

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

  edges = [[] for _ in range(n)]

  for _ in range(m):
    a, b = map(lambda x: int(x) - 1, input().split())
    edges[a].append(b)
    edges[b].append(a)

  visited = {0: -1}

  q = Queue()
  q.put(0)

  while not q.empty():
    current = q.get()
    for nxt in edges[current]:
      if nxt not in visited:
        visited[nxt] = current
        q.put(nxt)

  if len(visited) == n:
    print("Yes")
    for i in range(1, n):
      print(visited[i] + 1)
  else:
    print("No")


main()
n=sorted(list(map(int,input().split())))
if n=[1,4,7,9]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n=sorted(list(map(int,input().split())))
if n==[1,4,7,9]:
  print("YES")
else:
  print("NO")
x,y,z,K=map(int,input().split())
listsa=list(map(int,input().split()))#長さはｘ
listsb=list(map(int,input().split()))#長さはy
listsc=list(map(int,input().split()))#長さはz
if x*y>3000:
    suballlist=[]
    for i in lista:
        for j in listsb:
            suballlist.append(i+j)
    suballlist=sorted(suballlist,reverse=True)
    uselist=suballlist[:3000]
    alllist=[]
    for i in uselist:
        for j in listsc:
            alllist.append(i+j)
    alllist=sorted(alllist,reverse=True)
    for i in range(K):
        print(alllist[i])
    
elif x*y<=3000:
    alllist=[]
    for i in listsa:
        for j in listsb:
            for k in listsc:
                alllist.append(i+j+k)
                
    alllist=sorted(alllist,reverse=True)
    for i in range(K):
        print(alllist[i])

### FIXED CODE ###

import sys
input = sys.stdin.readline
x,y,z,K=map(int,input().split())
listsa=list(map(int,input().split()))#長さはｘ
listsb=list(map(int,input().split()))#長さはy
listsc=list(map(int,input().split()))#長さはz
if x*y>3000:
    suballlist=[]
    for i in listsa:
        for j in listsb:
            suballlist.append(i+j)
    suballlist=sorted(suballlist,reverse=True)
    uselist=suballlist[:3000]
    alllist=[]
    
    for i in uselist:
        for j in listsc:
            alllist.append(i+j)
            
    alllist=sorted(alllist,reverse=True)
    for i in range(K):
        print(alllist[i])
    
elif x*y<=3000:
    alllist=[]
    for i in listsa:
        for j in listsb:
            for k in listsc:
                alllist.append(i+j+k)
                
    alllist=sorted(alllist,reverse=True)
    for i in range(K):
        print(alllist[i])
n = int(input())
bl = false
for i in 9
    for j in 9
        if n = i * j:
            bl = true
            break

if bl = true:
    print ("Yes")
else:
    print ("No")


### FIXED CODE ###

n = int(input())
bl = 0
for i in range(1,10):
    for j in range(1,10):
        if n == (i * j):
            bl = 1
            break
if bl == 1:
    print ("Yes")
else:
    print ("No")
n = int(input())
ans = 0
for i in range(1. n+1):
    if i%3 == 0 or i%5 == 0:
        ans += i
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1, n+1):
    if i%3 != 0 and i%5 != 0:
        ans += i
print(ans)
s,t=input().split()
a,b=map(int,input().split())
u=str(input())

if s==u:
  print(a-1 b)
else:
  print(a b-1)

### FIXED CODE ###

s,t=input().split(" ")
a,b=map(int,input().split(" "))
u=input()
 
if s==u:
  print(a-1, b)
else:
  print(a, b-1)
n, x = map(int, input().split())
list_m = [1]*n
for i in n:
    list_m[i] = int(input())
    
min = min(list_m)
sum = sum(list_m)

x -= sum

result = int(x/min) + n
print(result)

### FIXED CODE ###

n, x = map(int, input().split())
list_m = [1]*n
for i in range(0, n):
    list_m[i] = int(input())
    
min = min(list_m)
sum = sum(list_m)

x -= sum

result = int(x/min) + n
print(result)
def cookies(A,B):
    if A%3==0 or B%3==0 or (A+B)%3==0:
        return 'Possible'
    else:
        return 'Impossible

### FIXED CODE ###

A, B = map(int, input().split())

if A%3==0 or B%3==0 or (A+B)%3==0:
    print('Possible')
else:
    print('Impossible')
n = int(input())
h = list(map(int,input().split()))
f = 0

for i in range(1,n):
    a = h[i-1] - h[i]
    if a > 1:
        break
    elif a == 1:
        if f == 1:
            break
        f = 1
    else:
        f = 0

    if i == n - 1:
        f = 2

if f == 2 or n == 1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = int(input())

cnt = 0

for i in range(1,n+1):
    ln = len(str(i))
    if ln % 2 == 1:
        cnt += 1

print(cnt)
a = str(input())
b = str(input())
a.sort()
b.sort()
if a <= b:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a = list(str(input()))
b = list(str(input()))
a.sort()
b.sort(reverse=True)
c = "".join(a)
d = "".join(b)
if c < d:
  print("Yes")
else:
  print("No")
s = input()
K = int(input())

new = ""
for i in range(len(s) - 1):
  diff = 26 - (ord(s[i]) - 97)
  if diff <= K:
    K -= diff
    new += "a"
  else:
    new += s[i]

if K > 0:
  new_char = ord(s[-1]) + K
  if new_char > 122:
    new_char = 96 + (new_char - 122)
  new += chr(new_char)
else:
  new += s[-1]

print(new)



### FIXED CODE ###

s = input()
K = int(input())

new = ""
for i in range(len(s) - 1):
  diff = (123 - ord(s[i])) % 26
  if diff <= K:
    K -= diff
    new += "a"
  else:
    new += s[i]

if K > 0:
  new_char = ord(s[-1]) + (K % 26)
  if new_char > 122:
    new_char = 96 + (new_char - 122)
  new += chr(new_char)
else:
  new += s[-1]

print(new)
n = int(input())
s = input()

if n%2==0:
  s1 = s[:n/2]
  s2 = s[n/2:]
  if s1 == s2:
    print("Yes")
  else:
    print("No")
else:
  print("No")

### FIXED CODE ###

n = int(input())
s = input()

if n%2==0:
  s1 = s[:int(n/2)]
  s2 = s[int(n/2):]
  if s1==s2:
    print("Yes")
  else:
    print("No")
else:
  print("No")
a,b = map(int,input().split())
ptint(max(a+a-1,a+b,b+b))

### FIXED CODE ###

a,b = map(int,input().split())
print(max(a+a-1,a+b,b+b-1))
import math

data = list(map(int, input().split()))
A, B = data[0], data[1]
gcd = math.gcd(A, B)
print(int(A*B/gcd))

### FIXED CODE ###

data = list(map(int, input().split()))
A, B = data[0], data[1]

def gcd(A, B):
    x = max(A, B)
    y = min(A, B)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z

def lcd(A, B):
    return A * B // gcd(A, B)

print(lcd(A, B))
a = 0
right = 0
left = 0
g = 0
su = 0
if A[0] == 0:
    for i in range(len(s)):
        su +=s[right]
        if right%2==0:
            g += 1
        right +=1
        if g<=K:
            a = max(a,su)
        else:
            while g>K:
              su -= s[left]
              if left%2==0:
                  g -=1
              left +=1
        a = max(a,su)
else:
    for i in range(len(s)):
        su +=s[right]
        if right%2==1:
            g += 1
        right +=1
        if g<=K:
            a = max(a,su)
        else:
            while g>K:
              su -= s[left]
              if left%2==1:
                  g -=1
              left +=1
        a = max(a,su)
print(a)

### FIXED CODE ###

N,K = list(map(int,input().split()))
A = input()
A = list(A)
A = list(map(int,A))
l = [0]
s = []

for i in range(N-1):
    if A[i] != A[i+1]:
        l.append(i+1)
        s.append(l[len(l)-1]-l[len(l)-2])
l.append(N)
s.append(l[len(l)-1]-l[len(l)-2])
a = 0
right = 0
left = 0
g = 0
su = 0
if A[0] == 0:
    for i in range(len(s)):
        su +=s[right]
        if right%2==0:
            g += 1
        right +=1
        if g<=K:
            a = max(a,su)
        else:
            while g>K:
              su -= s[left]
              if left%2==0:
                  g -=1
              left +=1
        a = max(a,su)
else:
    for i in range(len(s)):
        su +=s[right]
        if right%2==1:
            g += 1
        right +=1
        if g<=K:
            a = max(a,su)
        else:
            while g>K:
              su -= s[left]
              if left%2==1:
                  g -=1
              left +=1
        a = max(a,su)

print(a)
xyz = input().split()
x,y,z = int(xyz=[0]), int(xyz[1]),int(xyz[2])

a = x + y
b = y + z
c = z + x
print(min([a, b, c]))

### FIXED CODE ###

x,y,z = (int(x) for x in input().split())

a = x + y
b = y + z
c = z + x

print(min([a, b, c]))