Harryxun/stf_run huggingface dataset:
N, K = map(int, input().split())

S = str(input())

L = [0]
for i in range(len(S)-1):
#     print(S[i],S[i+1])
    if S[i] != S[i+1]:
        L.append(i+1)
L.append(len(S))
# print(L)

ans = 1
if N > K:
    for i in range(len(L)-K*2-1):
        ans = max(ans, L[i+K*3-1]-L[i])
    print(ans)
else:
    print(len(S))

### FIXED CODE ###

N, K = map(int, input().split())
S = list(str(input()))

count = 1
L = []
L.append(0)
for i in range(N):
    if i < N-1:
        if S[i] == S[i+1]:
            count += 1
        else:
            L.append(count)
            count = 1
    else:
        L.append(count)
        count = 1
L.append(0)

if S[0] == '1':
    ans = 0
    tmp = 0
    dist = 2 * (K + 1)
    for i in range(len(L)):
        tmp += L[i]
        if i % 2 == 1:
            if i - dist >= 0:
                tmp -= L[i-dist]
                tmp -= L[i-dist+1]
            ans = max(ans, tmp)
        else:
            if i == N - 1:
                ans = max(ans, tmp)
    print(ans)

if S[0] == '0':
    ans = 0
    tmp = 0
    dist = 2 * (K + 1)
    for i in range(len(L)):
        tmp += L[i]
        if i % 2 == 0:
            if i - dist + 1 >= 0:
                tmp -= L[i-dist+1]
            if i - dist >= 0:
                tmp -= L[i-dist]
            ans = max(ans, tmp)
        else:
            if i == N - 1:
                ans = max(ans, tmp)
    print(ans)
import math

A,B = map(int, input().split())
print(A*B//math.gcd(A , B))

### FIXED CODE ###

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

count = 1
while True:
    if count*A%B == 0:
        print(count*A)
        break
    else:
        count += 1
a = list(map(int,input().split()))
op = a[1]
 
if op == "+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))

### FIXED CODE ###

a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)
#coding:utf-8

def count(a):
	if a == 25:
		print "Christmas"
	if  a == 24:
		print "Christmas Eve"
	if  a == 23:
		print "Christmas Eve Eve"
	if a==22:
		print "Christmas Eve Eve Eve"

if __name__ == "__main__":
    print('入力してください')
    b = input('a = ')
    count(b)   

### FIXED CODE ###

#coding:utf-8
a = int(input())

if a == 25:
	print('Christmas')
if a == 24:
	print('Christmas Eve')
if a == 23:
	print('Christmas Eve Eve')
if a==22:
	print('Christmas Eve Eve Eve')
N, K = map(int, input().split())
A = list(map(int, input().split()))
if N < K*3:
    for i in range(N):
        print(N, end=' ')
    print('')
else:
    for k in range(K):
        B = [0]*N
        for i in range(N):
            for j in range(max(i-A[i], 0), min(A[i]+i+1, N)):
                B[j] += 1
        A = B
    print(A)

### FIXED CODE ###

S = list(input())
print(''.join(S[0:3]))
import sys
if __name__ == '__main__':
    N = int(input())
    W = [int(input()) for _ in range(N)]
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit()
    print('Yes')

### FIXED CODE ###

import sys
if __name__ == '__main__':
    N = int(input())
    W = [str(input()) for _ in range(N)]
    if len(W) != len(set(W)):
        print('No')
        sys.exit(0)
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit(0)
    print('Yes')
s=input()
q=int(input())
for i in range(q):
    line=list(input().split())
    if line[0]==1:
        s=s[::-1]
    else:
        t=line[2]
        if line[1]==1:
            s=t+s 
        else:
            s=s+t
print(s)

### FIXED CODE ###

#abc 158 d
from collections import deque
x=deque()
flag=True # muki  true: migi false: hidari
s=input()
x.append(s)
q=int(input())
cnt=0
for i in range(q):
    line=list(input().split())
    if len(line)==1:
        cnt+=1
        if cnt%2==1:
            flag=False
        else:
            flag=True
    else:
        t=line[2]
        if line[1]=="1":
            if flag==True:
                x.appendleft(t)
            else:
                x.append(t)
        else:
            if flag==True:
                x.append(t)
            else:
                x.appendleft(t)
ans="".join(x)
if flag==False:
    ans=ans[::-1]
print(ans)
X,N = [int(x) for x in input().split()]
if N == 0:
    print(X)
else:
    p = [int(x) for x in input().split()]

    sorted_p = sorted(p)
    flag = 0

    for x in range(N-1):
        diff = abs(X - sorted_p[x])
        if diff == 0:
            flag = 1
            break
        if diff <= abs(X-sorted_p[x+1]):
            break

    def checknum(d,loweridx,upperidx):
        upper = sorted_p[upperidx]
        lower = sorted_p[loweridx]
        if X-d == lower:
            if X+d == upper:
                checknum(d+1,loweridx-1,upperidx+1)
            elif X-d == lower and X+d != upper:
                print(X+d)        
        else:
            return print(X-d)

    checknum(1,x-1,x+1)

### FIXED CODE ###

X,N = [int(x) for x in input().split()]
p = [int(x) for x in input().split()]

for d in range(X+1):
    for f in [-1,1]:
        a = X + d*f
        if p.count(a) == 0:
            print(a)
            exit()
import heapq as h

# input
n, m = map(int, input().split())
la = list(map(lambda x: int(x)*-1, input().split()))

h.heapify(la)

while m > 0:
    max = abs(la[0])
    h.heapreplace(la, (max // 2)*-1)
    m -= 1

print(abs(sum(la)))


### FIXED CODE ###

# input string
s = input()

if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
elif s == "Rainy":
    print("Sunny")
n, m = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

x.sort()
print(x)

dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

length = x[m-1]-x[0]
for i in range(n-1):
    length -= dist[i]

print(length)


### FIXED CODE ###

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

x.sort()

dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

if m <= n:
    print(0)
else:
    length = x[m-1]-x[0]
    for i in range(n-1):
        length -= dist[i]
    print(length)
N = int(input())

A = (int(n) for n in input().split())

flag = 1
num_c  = 0
while(flag):
    flag = 0
    for j in range(1, N):
        if A[j] < A[j-1]:
            v = A[j]
            A[j] = A[j-1]
            A[j-1] = v
            num_c += 1
            flag = 1
print((" ").join((str(a) for a in A)))
print(num_c)

### FIXED CODE ###

N = int(input())

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

flag = 1
num_c  = 0
while(flag):
    flag = 0
    for j in range(1, N):
        if A[j] < A[j-1]:
            v = A[j]
            A[j] = A[j-1]
            A[j-1] = v
            num_c += 1
            flag = 1

print((" ").join((str(a) for a in A)))
print(num_c)
import sys
from collections import deque


N, M = [int(i) for i in input().split()]
A = []
B = []
for i in range(M):
    l = [int(i) for i in input().split()]
    A.append(l[0])
    B.append(l[1])

# BFS
G = [[] for _ in range(N)]
for i in range(N):
    G[A[i] - 1].append(B[i] - 1)
    G[B[i] - 1].append(A[i] - 1)
G = [list(set(x)) for x in G]

q = deque([])
dist = [-1] * N
ans = [-1] * N
ans[0] = 0
dist[0] = 0
q.appendleft(0)
while(len(q) > 0):
    v = q.pop()
    for nv in G[v]:
        if not dist[nv] == -1:
            continue
        dist[nv] = dist[v] + 1
        ans[nv] = v
        q.appendleft(nv)

for i in ans[1:]:
    if i == -1:
        print('No')
        sys.exit()

for i, v in enumerate(ans):
    if i == 0:
        print('Yes')
        continue
    print(v + 1)
    

### FIXED CODE ###

import sys
from collections import deque


N, M = [int(i) for i in input().split()]
A = []
B = []
for i in range(M):
    l = [int(i) for i in input().split()]
    A.append(l[0])
    B.append(l[1])

# BFS
G = [[] for _ in range(N)]
for i in range(M):
    G[A[i] - 1].append(B[i] - 1)
    G[B[i] - 1].append(A[i] - 1)
# G = [list(set(x)) for x in G]

q = deque([])
ans = [-1] * N
ans[0] = 0
q.appendleft(0)
while(len(q) > 0):
    v = q.pop()
    for nv in G[v]:
        if not ans[nv] == -1:
            continue
        ans[nv] = v
        q.appendleft(nv)

# for i in ans[1:]:
#     if i == -1:
#         print('No')
#         sys.exit()

for i, v in enumerate(ans):
    if i == 0:
        print('Yes')
        continue
    print(v + 1)
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if (a+b)/3:
  print('Possible')
else:
  print('Impossible')
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if (a+b)%3 == 0:
  print('Possible')
else:
  print('Impossible')


### FIXED CODE ###

from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]

if a%3==0 or b%3==0 or (a+b)%3==0:
  print('Possible')
else:
  print('Impossible')
N=int(input())
hoge=input()
count=0
hoge=hoge.split()
for i in range(N):
  hoge[i] = int(hoge[i])
while True:
  all_even=True
  for i in range(N):
    if hoge[i] % 2 != 0:
      all_even = False
  if all_even == False:
    break
  else:
    count += 1
    for i in range(N):
      hoge[i]=hoge[i]/2
print(count)

### FIXED CODE ###

hoge=input()
count=0
for i in range(3):
  if hoge[i] == '1':
    count += 1
print(count)
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
ap = 0
ad = 0
for i in a:
    ap += b[i - 1]
    
for j in range(1, len(a)):
    
    if a[j] - a[j - 1] == 1:
            ad += c[j]

print(ap + ad)
        

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
ap = 0
ad = 0
for i in a:
    ap += b[i - 1]
    
for j in range(1, len(a)):
    
    if a[j] - a[j - 1] == 1:
            ad += c[a[j - 1] - 1]

print(ap + ad)
def a(t,i):
    if i == n-1:
        return sum(map(int,t.split()))
    return a(t+s[i+1],i+1)+ a(t+"+"+s[i+1])

s = input()
n = len(s)
print(a(s[0],0))


### FIXED CODE ###

def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)
s=[input()]
q=int(input())
turn=True

for i in range(q):
    qq=input().split()
    if qq[0]=='1':
        turn=not turn
    else:
        if turn==bool(int(qq[1])-2):
            s.appendleft(qq[2])
        else:
            s.append(qq[2])

text="".join(s)
print(text if turn else text[::-1])

### FIXED CODE ###

s=[input()]
q=int(input())
turn=True
l=""
for i in range(q):
    qq=input().split()
    if qq[0]=='1':
        turn=not turn
    else:
        if turn==bool(int(qq[1])-2):
            l+=qq[2]
        else:
            s.append(qq[2])

text=l[::-1]+"".join(s)
print(text if turn else text[::-1])
sadf

### FIXED CODE ###

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

import math

M_rad = math.radians(360 * (M / 60))
H_rad = math.radians(30 * (M / 60) + 360 * (H / 12))

AB = abs(M_rad - H_rad)
tmp = A ** 2 + B ** 2 - 2 * A * B * math.cos(AB)
ans = math.pow(tmp, 1 / 2)
print(ans)
N, K = map(int, input().split())
A = list(map(int, input().split()))
mn = min(*A)
mx = max(*A)
f = True
for x in A:
    if x % mn != 0:
        f = False
        break
if (f == False or K % mn == 0) and mx >= K:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')


### FIXED CODE ###

import random
import fractions

def solve(N, K, A):
    gcd = A[0]
    for x in A:
        gcd = fractions.gcd(gcd, x)
    if K % gcd == 0 and max(A) >= K:
        return 'POSSIBLE'
    else:
        return 'IMPOSSIBLE'

def solve2(N, K, A):
    mx = max(A)
    B = [False] * (mx + 1)
    for i in A:
        B[i] = True
    while True:
        update = False
        for i in range(mx + 1):
            if not B[i]:
                continue
            for j in range(i + 1, mx + 1):
                if not B[j]:
                    continue
                d = abs(i - j)
                if not B[d]:
                    update = True
                    B[d] = True
        if not update:
            break
    return 'POSSIBLE' if K <= mx and B[K] else 'IMPOSSIBLE'

#for i in range(100000):
#    N = random.randint(1, 5)
#    K = random.randint(1, 20)
#    A = [random.randint(1, 20) for i in range(N)]
#    if solve(N, K, A) != solve2(N, K, A):
#        print(N, K, A)
#        print(solve(N, K, A))
#        print(solve2(N, K, A))
#        break

N, K = map(int, input().split())
A = list(map(int, input().split()))
print(solve(N, K, A))
N,M = map(int,input())
S = []
K = []
for i in range(M):
    s = list(map(int,input().split()))
    k = s.pop(0)
    S.append(s)
    K.append(k)
P = list(map(int,input().split()))
for i in range(2**N):
    sw = [0]*N
    for j in range(N):
        if (i>>j)&1:
            sw[j] = 1
    flag = 1
    for m in range(M):
        po = S[m]
        sum = 0
        for k in range(K[m]):
            if sw[po[k]-1] == 1:
                sum = (sum + 1)%2
        if P[m] != sum:
            flag = 0
    if flag == 1:
        ans += 1
print(ans)

### FIXED CODE ###

N,M = map(int,input().split())
S = []
K = []
for i in range(M):
    s = list(map(int,input().split()))
    k = s.pop(0)
    S.append(s)
    K.append(k)
P = list(map(int,input().split()))
ans = 0
for i in range(2**N):
    sw = [0]*N
    for j in range(N):
        if (i>>j)&1:
            sw[j] = 1
    flag = 1
    for m in range(M):
        po = S[m]
        sum = 0
        for k in range(K[m]):
            if sw[po[k]-1] == 1:
                sum = (sum + 1)%2
        if P[m] != sum:
            flag = 0
    if flag == 1:
        ans += 1
print(ans)
N = int(input())
S = input()
count = 0
count2 = 0
flag = False
for x in range(N):
    if S[x] == '#':
        flag = True
    if S[x] == '.' and flag == True:
        count += 1

flag = False

for x in range(N)[::-1]:
    if S[x] == '.':
        flag = True
    if S[x] == '#' and flag == True:
        count2 += 1

print(min(count,count2))

### FIXED CODE ###

A,B,C = [int(x) for x in input().split()]

if (A <= C and C <= B) or (B <= C and C <= A):
    print("Yes")
else:
    print("No")
import math
import fractions


def lcm(x, y):
    return math.floor((x * y) / fractions.gcd(x, y))


if __name__ == '__main__':
    a, b, c, d = map(int, input().split())
    warikireru_c = math.floor(b / c) - math.ceil(a / c) + 1
    warikireru_d = math.floor(b / d) - math.ceil(a / d) + 1
    lcm_1 = lcm(c, d)
    warikireru_lcm = math.floor(b / lcm_1) - math.ceil(a / lcm_1) + 1
    num = b - a + 1
    print(num - (warikireru_c + warikireru_d - warikireru_lcm))

### FIXED CODE ###

import re

s = input()

if re.findall(r"(.)\1+",s):
    print("Bad")
else:
    print("Good")
import math
a, b, h, m = map(int, input().split())
x = 360*(h/12)+30*(m/60)
y = 360*(m/60)
d = math.cos(math.radians(abs(x-y)))
z = a**2 + b**2 -2*a*b*d
print (math.sqrt(z))


### FIXED CODE ###

k = int(input())
s = input()
if len(s) <= k:
	print (s)
else:
	print (s[:k] + "...")
d = int(input())
c = tuple(map(int, input().split()))
s = [
    tuple(map(int, input().split()))
    for _ in range(d)
]

m = 0
ans = []
last = [0] * 26
for i in range(d):
    # for all contest
    mdmax = 0
    mdi = 0
    for j, ss in enumerate(s[i]):
        md = 0
        # choose one contest to open
        for k in range(26):
            if j == k:
                md += s[i][j]
            else:
                md -= (i - last[k]) * c[i]
        if md > mdmax:
            mdi = j
            mdmax = md
    ans.append(mdi + 1)
    for j in range(26):
        if j == mdi:
            last[j] = 0
        else:
            last[j] += 1

for a in ans:
    print(a)

### FIXED CODE ###

d = int(input())
c = tuple(map(int, input().split()))
s = [
    tuple(map(int, input().split()))
    for _ in range(d)
]

for i in range(d):
    m = sorted((ss, j) for j, ss in enumerate(s[i]))[-1]
    print(m[1] + 1)
from heapq import *

n, m = map(int, input().split())
hp = []
used = [0] * (m + 1)
for _ in range(n):
    a, b = map(int, input().split())
    heappush(hp, [-b, a])
while hp:
    b, a = heappop(hp)
    while a <= m:
        if used[a] == 0: break
        a += 1
    if a == m + 1:
        continue
    else:
        used[a] = -b
print(sum(used))


### FIXED CODE ###

# pdf
from heapq import *

n, m = map(int, input().split())
hp = []
for _ in range(n):
    a, b = map(int, input().split())
    heappush(hp, [a, b])
ans = 0
mx = b
ch = []
a, b = heappop(hp)
flag = 1
for i in range(1, m + 1):
    while a <= i:
        if flag:
            heappush(ch, -b)
            flag = 0
        if not hp:break
        a, b = heappop(hp)
        flag = 1
    if ch:
        ans -= heappop(ch)
print(ans)
L = map(int, raw_input().split())
L.sort()
print " ".join(L)

### FIXED CODE ###

L = map(int, raw_input().split())
L.sort()
print " ".join(map(str, L))
N,K=map(int, input().split()) 
for i in　range(10)
	if K**i<=N<=K**(i+1):
    	print(i+1)


### FIXED CODE ###

N,K=map(int, input().split()) 
for i in range(8000):
    if K**i<=N<K**(i+1):
        print(i+1)
n = int(input())
k = int(input())
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用

for i in range(2, 2001):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

for i in range(1,k+1):
    print(cmb(n-k+1,i,p) * cmb(k-1,i-1,p))


### FIXED CODE ###

n, k = map(int, input().split())
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用

for i in range(2, 3000):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

for i in range(1,k+1):
    print((cmb(n-k+1,i,p)%p * cmb(k-1,i-1,p)%p))
a, b, c = map(int, input().split())

if a <= b:
    if b <= c:
        print("{0} {1} {2}".format(a, b, c))
    else if c <= a:
        print("{0} {1} {2}".format(c, a, b))
    else:
        print("{0} {1} {2}".format(a, c, b))

else:
    if a <= c:
        print("{0} {1} {2}".format(b, a, c))
    else if c <= b:
        print("{0} {1} {2}".format(c, b, a))
    else:
        print("{0} {1} {2}".format(b, c, a))

### FIXED CODE ###

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

if a <= b:
    if b <= c:
        print("{0} {1} {2}".format(a, b, c))
    elif c <= a:
        print("{0} {1} {2}".format(c, a, b))
    else:
        print("{0} {1} {2}".format(a, c, b))

else:
    if a <= c:
        print("{0} {1} {2}".format(b, a, c))
    elif c <= b:
        print("{0} {1} {2}".format(c, b, a))
    else:
        print("{0} {1} {2}".format(b, c, a))
def main():
  n=int(input())
  a=list(map(int, input().split()))
  if 0 in A:
    print(0)
    return
  p=1
  for a in A:
    p*=a
    if p>1000000000000000000:
      print(-1)
      return
  print(p)
main()
  


### FIXED CODE ###

def main ():
  N = int(input())
  A = list(map(int,input().split()))
  if 0 in A:
    print (0)
    return
  prod = 1 
  for a in A:
    prod *= a
    if prod > 1000000000000000000:
      print(-1)
      return
  print(prod) 
main ()
N, M = map(int, input().split())

par = list(range(N))
rank = [1]*N
size = [1]*N

def find(x):
  if par[x] == x:
    return x
  else:
    return find(par[x])
  
def unite(x,y):
  x = find(x)
  y = find(y)
  
  if x == y:
    return
  if rank[x]<rank[y]:
    x,y = y,x
  else:
  par[y] = x
  size[x] += size[y]
  if rank[x]==rank[y]:
    rank[x]+=1
    
for i in range(M):
  a,b = [int(i)-1 for i in input().split()]
  unite(a,b)
  
print(max(size))

### FIXED CODE ###

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

par = list(range(N))
rank = [1]*N
size = [1]*N

def find(x):
  if par[x] == x:
    return x
  else:
    return find(par[x])
  
def unite(x,y):
  x = find(x)
  y = find(y)
  
  if x == y:
    return
  if rank[x]<rank[y]:
    par[x]=y
    size[y]+= size[x]
  else:
    par[y] = x
    size[x] += size[y]
    if rank[x]==rank[y]:
      rank[x]+=1
    
for i in range(M):
  a,b = [int(i)-1 for i in input().split()]
  unite(a,b)
  
print(max(size))
numbers = list(map(int,input().split()))
print((numbers[0]*numbers[1])+" "+(numbers[0]+numbers[1])*2)

### FIXED CODE ###


numbers = list(map(int,input().split()))
print(str(numbers[0]*numbers[1])+" "+str((numbers[0]+numbers[1])*2))
[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
coun = 0
for i in range(0,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c,c1+1-10*i-2*j]):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)


### FIXED CODE ###

[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
coun = 0
for i in range(0,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c+1,c1+1-10*i-2*j])):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)
N = int(input())
if N>0 or N<=100:
    A = []
    for i in range(0,N):
      B = int(input())
      if B>0 or B<=1000:
          A.append(B)
      else:
          break
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = int(1/sum1)
    print(result)

### FIXED CODE ###

try:
    N = int(input())
    if N>0 or N<=100:
        S = input()
        A = S.split()
        A = list(map(int, A)) 
 
        sum1 = 1/A[0]
 
        for i in range(0,N-1):
         sum1 = sum1 + 1/A[i+1]
 
        result = 1/sum1
        print(result)

except:
        print("Error")
def main():
    cache = set()
    primes = {2}

    def isprime(n):
        if n in primes:
            return True
        for i in range(3, math.sqrt(n)+1, 2):
            if n % i == 0:
                return False
        primes[n] = True
        return True

    Q = int(input())

    for i in range(Q):
        l, r = map(int, input().split())
        cnt = 0
        if l % 4 == 3:
            l += 2
        for n in range(l, r+1, 4):
            m = (n - 1) // 2
            assert n % 4 == 1
            if isprime(m+1) and isprime(n)
                cnt += 1
        print(cnt)
main()


### FIXED CODE ###

from math import sqrt, ceil

cache = {3}
primes = {2,3}
def isprime(n):
    if n in primes:
        return True
    for i in range(3, ceil(sqrt(n))+1, 2):
        if n % i == 0:
            return False
    primes.add(n)
    return True

def prepare():
    l = 5
    r = 10**5-1
    for n in range(l, r+1, 4):
        if n in cache:
            continue
        m = (n - 1) // 2
        if isprime(m+1) and isprime(n):
            cache.add(n)

def solve(l, r):
    cnt = 0
    if l <= 3 <= r:
        cnt = 1
        l = 5
    if l % 4 == 3:
        l += 2
    for n in range(l, r+1, 4):
        if n in cache:
            cnt += 1
            continue
        m = (n - 1) // 2
        assert n % 4 == 1
        if isprime(m+1) and isprime(n):
            cache.add(n)
            cnt += 1
    return cnt

def main():
    global cache
    from bisect import bisect_left, bisect_right
    cache = sorted(cache)
    Q = int(input())
    for _ in range(Q):
        l, r = map(int, input().split())
        i = bisect_left(cache, l)
        j = bisect_right(cache, r)
        print(j-i)

prepare()
main()
s = list(input())
s = list(set(s))
s.sort()
ans = 'a'
cnt = 0
while True:
    if cnt == 26:
        print('None')
        break
    else:
        if s[cnt] != ans:
            print(ans)
            break
        else:
            ans = chr(ord(ans)+1)
            cnt += 1


### FIXED CODE ###

S = input()
ans = None
for letter in "abcdefghijklmnopqrstuvwxyz":
    if letter not in S:
        ans = letter
        break
print(ans)