Harryxun/stf_run huggingface dataset:
# Fast IO (only use in integer input) or take care about string

import os,io
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for _ in range(N):
  str = input()
  if str[0] == 'A':
    AC += 1
  elif str[0] == 'W':
    WA += 1
  elif str[0] == 'T':
    TLE += 1
  elif str[0] == 'R':
    RE += 1
print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))

### FIXED CODE ###

import sys
input = sys.stdin.readline
 
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
 
for _ in range(N):
  str1 = input()
  if str1[0] == 'A':
    AC += 1
  elif str1[0] == 'W':
    WA += 1
  elif str1[0] == 'T':
    TLE += 1
  elif str1[0] == 'R':
    RE += 1
print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))
N, K = (int(i) for i in input().split())

if K=1:
    ans=0
else:
    ans=N-K
print(ans)

### FIXED CODE ###

N, K = (int(i) for i in input().split())

if K==1:
    ans=0
else:
    ans=N-K

print(ans)
import functools, fractions
 
def lcm(a, b):
	return a * b // fractions.gcd(a, b)
 
def check(L, NM):
    res = []
    for i in range(NM):
        res.append(int(i*(L/NM)+1))
    return res
 
def check2(x, L, NM):
    return int((x-1)*NM/L)
 
 
def main():
    N,M = map(int,input().split())
    S = input()
    T = input()
    L = lcm(N,M)
    ans = L
 
 
    a = list(set(check(L, N)) & set(check(L, M)))
    for i in a:
        if S[check2(i, L, N)] != T[check2(i, L, M)]:
            ans = -1
            break
    print(ans)
if __main__ == '__main__':
  main()

### FIXED CODE ###

import functools, fractions

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

def lcm(a, b):
	return a * b // fractions.gcd(a, b)

def check(L, NM):
    res = []
    for i in range(NM):
        res.append(int(i*(L/NM)+1))
    return res

def check2(x, L, NM):
    return int((x-1)*NM/L)

L = lcm(N,M)
ans = L


a = list(set(check(L, N)) & set(check(L, M)))
for i in a:
    if S[check2(i, L, N)] != T[check2(i, L, M)]:
        ans = -1
        break
print(ans)
n,m,x = map(int,input().split())
ca = [list(map(int,input().split())) for _ in range(n)]
c = [ca[i][0] for i in range(n)]
a = [ca[i][1:] for i in range(n)]
l = 0
ans = sum(c) 
for i in range(2 ** n):
    get = [0] * m
    kari = 03 
    for j in range(n):
        if (i >> j) & 1: #i(ex.5)を2進数(ex.101)に一桁ずつ変換
            get = [x + y for (x, y) in zip(get, a[j])]
            kari += c[j]
    #print(get,kari)
    #print([k >= x for k in get])
    if all([k >= x for k in get]):
        ans = min(ans,kari)
        l += 1
if l == 0:
    ans = -1
    
print(ans)
     

### FIXED CODE ###

n,m,x = map(int,input().split())
ca = [list(map(int,input().split())) for _ in range(n)]
c = [ca[i][0] for i in range(n)]
a = [ca[i][1:] for i in range(n)]
l = 0
ans = sum(c) 
for i in range(2 ** n):
    get = [0] * m
    kari = 0
    for j in range(n):
        if (i >> j) & 1: #i(ex.5)を2進数(ex.101)に一桁ずつ変換
            get = [x + y for (x, y) in zip(get, a[j])]
            kari += c[j]
    #print(get,kari)
    #print([k >= x for k in get])
    if all([k >= x for k in get]):
        ans = min(ans,kari)
        l += 1
if l == 0:
    ans = -1
    
print(ans)
def gcd(a, b):
    if a % b == 0:
        return b
    return gcd(b, a % b)

def lcm(a, b):
    return a * b / gcd(a, b)

n = int(input())
ans = 1
for i in range(n):
    t = int(input())
    ans = lcm(ans, t)

print(ans)

### FIXED CODE ###

def gcd(a, b):
    if a % b == 0:
        return b
    return gcd(b, a % b)

def lcm(a, b):
    return a * b // gcd(a, b)

n = int(input())
ans = 1
for i in range(n):
    t = int(input())
    ans = lcm(ans, t)

print(int(ans))
import math

def prime_calc(n):
    if n < 2:
        return False
    elif n==2 or n==3 or n==5 or n==7:
        return True
    else:
        rootN = math.floor(math.sqrt(n))
        i = 11
        while rootN > i:
            if n % i == 0:
                return False
            else:
                i += 2

    return True

def prime(n):
    cnt = 0
    for i in range(2, n+1):
        ans = prime_calc(i)
        if ans is True:
            cnt = cnt + 1

    return cnt

def main():
    l = []

    for line in sys.stdin:
        l.append(int(line))

    for line in l:
        print(prime(line))

if __name__ == "__main__":
    main()


### FIXED CODE ###

import math
import sys

sup = 1000000

is_prime = [0] * sup

count = [0] * sup

def setup():
    is_prime[2] = 1
    for n in range(3,sup,2):
        flag = True
        for i in range(3, int(math.floor(math.sqrt(n) + 1)), 2):
            if n % i == 0:
                flag = False
                break
        if flag:
            is_prime[n] = 1

def precount():
    for n in range(2, sup):
        count[n] = count[n-1] + is_prime[n]

def main():
    setup()
    precount()

    l = []

    for line in sys.stdin:
        l.append(int(line))

    for line in l:
         print(count[line])

if __name__ == "__main__":
    main()
N,M,C = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
lst = []
for i in range(N):
  A = list(map(int,input().split()))
  lst.append(A[i]*B[i])
for i in lst:
    if i > 0:
      ans += 1
print(ans)

### FIXED CODE ###

N,M,C = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
total = 0
lst = []
for i in range(N):
  A = list(map(int,input().split()))
  for j in range(M):
    total += A[j]*B[j]
  lst.append(total)
  total = 0
for i in lst:
    if i +C > 0:
      ans += 1
print(ans)
from collections import deque

N, M = map(int, input().split())
graph = [[] for i in range(M)]
for i in range(M):
    a, b = map(int, input().split())
    a, b = a-1, b-1
    graph[a].append(b)
    graph[b].append(a)
    
dist = [-1] * N
dist[0] = 0
    
queue = deque([0])

while queue:
    v = queue.popleft()
    for nv in graph[v]:
        if (dist[nv] != -1):
            continue
        dist[nv] = v
        queue.append(nv)

print("Yes")
for i in dist[1:]:
    print(i+1)


### FIXED CODE ###

from collections import deque

N, M = map(int, input().split())
graph = [[] for i in range(N)]
for i in range(M):
    a, b = map(int, input().split())
    a, b = a-1, b-1
    graph[a].append(b)
    graph[b].append(a)
    
dist = [-1] * N
dist[0] = 0
    
queue = deque([0])

while queue:
    v = queue.popleft()
    for nv in graph[v]:
        if (dist[nv] != -1):
            continue
        dist[nv] = v
        queue.append(nv)
        
print("Yes")
for i in dist[1:]:
    print(i+1)
x = map(int, input())
print(2*x*3.14)

### FIXED CODE ###

x = int(input())
print(2*x*3.14)
n=int(input())
S=[]
for i in range(n):
  s=list(input())
  s.sort()
  S.append(s)
S.sort()
S.append(["z" for i in range(11)])
cont=0
for i in range(n-1):
  t=1
  while S[i]==S[i+t]:
    cont+=1
    t+=1
print(cont)

### FIXED CODE ###

a,b=map(int,input().split())
c=[a+b, a-b, a*b]
m=max(c)
print(m)
N,Q = map(int, input().split())

score = [0 for _ in range(N)]
 
# 子頂点番号:親頂点番号のdictを生成する
d = {}
for i in range(1,N):
  a,b = map(int,input().split())
  d[b] = a
      
# スコア加算処理
for i in range(1,Q+1):
  p,x = map(int,input().split())
  score[p-1] = x
for i in range(1,len(score)):
  addScore = score[d[i+1]-1]
  score[i] += addScore
print(*score)

### FIXED CODE ###

from collections import deque
n,q=map(int, input().split())
l=[[] for i in range(n+1)]
ans=[0]*(n+1)

for i in range(n-1):
    a,b=[int(j) for j in input().split()]
    l[a].append(b)
    l[b].append(a)
for i in range(q):
    p,x=[int(j) for j in input().split()]
    ans[p]+=x

que=deque()
que.append(1)
ll=[0]*(n+1)
while que:
    y=que.popleft()
    ll[y]=1
    for i in l[y]:
        if ll[i]==1:
            continue
        ans[i]+=ans[y]
        que.append(i)
print(*ans[1:])
a,b=input().split()
c,d=input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
play_day=a-(b+c)
if play_day>=0:
    print(play_day)
else:
    print(-1)

### FIXED CODE ###

a,b=map(int,input().split())
C=list(map(int,input().split()))
play_day=a-sum(C)
if play_day>=0:
    print(play_day)
else:
    print("-1")
# -*- coding:utf8 -*-

a,b = map(int,input().split())
ans = (b - a) / 2 if (b - a) % 2 == 0 else 'IMPOSSIBLE'
if ans < 0:
    ans = ans * -1
print(ans)

### FIXED CODE ###

# -*- coding:utf8 -*-

l = sorted(list(map(int,input().split())))
a, b = l[0], l[1]
ans = int(a + ((b - a) / 2)) if (b - a) % 2 == 0 else 'IMPOSSIBLE'
print(ans)
import math
K=int(input())
ans=0
for a in range(1,K):
    for b in range(1,K):
        for c in range(1,K):
            n=math.gcd(a,b,c)
            ans=ans+n

print(ans)

### FIXED CODE ###

import math
K=int(input())
k=K+1
ans=0
for a in range(1,k):
    for b in range(a,k):
        for c in range(b,k):
            m=math.gcd(a,b)
            o=math.gcd(m,c)
            if a==b and b==c:
                n=o
            elif a==b or b==c:
                n=o*3
            else:
                n=o*6
                
            ans+=n

print(ans)
n = int(input())
list = []

while n > 9**5:
    n = n - 9**5
    list.append(g)

while n > 6**6:
    n = n - 6**6
    list.append(g)


while n > 6**5:
    n = n - 6**5
    list.append(g)


for i in [4,3,2,1]:

    for r in [9,6,]:
        while n > r**i:
            n = n - r**i
            list.append(r**i)



length = len(list) + n
print(length)



### FIXED CODE ###

n = int(input())
res = n
ans = 0
for i in range(n+1):
    t = i
    cc = 0
    while t >= 1:
        cc = cc + t % 6
        t = t // 6

    t = n-i
    while t >= 1:
        cc = cc + t%9
        t = t // 9


    if res > cc:
        res = cc

print(res)
k=input()
for i in range(k):
  print("ACL",end="")

### FIXED CODE ###

k = int(input())
for i in range(k):
  print("ACL",end="")
X = int(input())
dp = [0 for i in range(X+1)]
if X <100:
    print(0)
else:
    for i in range(100,106):
        dp[i] =1
    for i in range(1,X+1):
        if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
            dp[i] = 1
    print(dp[-1])

### FIXED CODE ###

X = int(input())
if X >= 2000:
    print(1)
elif X<= 99:
    print(0)
else:
    c = 0
    for i in range(1,20):
        if int(X//100) == i:
            if X%100 <= i*5:
                c=1
    print(c)
n, q = [int(i) for i in input().split()]
ab = [[] for _ in range(n)]
for _ in range(n - 1):
    i, j = [int(i)-1 for i in input().split()]
    ab[i].append(j)
    ab[j].append(i)
p = [0]*n
for _ in range(q):
    i, j = [int(i) for i in input().split()]
    p[i-1] += j

al = [False]*n
pp = [0]*n


def a(i=0, j=0):
    al[i] = True
    j += p[i]
    pp[i] = str(j)
    for k in ab[i]:
        if not al[k]:
            a(k, j)


a()
print(" ".join(pp))


### FIXED CODE ###

import sys

sys.setrecursionlimit(1000000)


def input():
    return sys.stdin.readline()


n, q = [int(i) for i in input().split()]
ab = [[] for _ in range(n)]
for _ in range(n - 1):
    i, j = [int(i)-1 for i in input().split()]
    ab[i].append(j)
    ab[j].append(i)
p = [0]*n
for _ in range(q):
    i, j = [int(i) for i in input().split()]
    p[i-1] += j

al = [False]*n
pp = [0]*n


def a(i=0, j=0):
    al[i] = True
    j += p[i]
    pp[i] = str(j)
    for k in ab[i]:
        if not al[k]:
            a(k, j)


a()
print(" ".join(pp))
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
print(sum(l[:n-k]))
//print(l)

### FIXED CODE ###

n,k=map(int,input().split())
h=list(map(int,input().split()))
h.sort()
print(sum(h[:max(0,n-k)]))
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  print(str(a.index(i+1)+1),end=" ")

### FIXED CODE ###

n=int(input())
if(n%2==0):
  print(0.5)
else:
  print((n-int(n/2))/n)
input()
nums = [ int(i) for i in input().split()]
??????
print( min(nums), max(nums), sum(nums))

### FIXED CODE ###

input()
nums = [ int(i) for i in input().split()]
print( min(nums), max(nums), sum(nums))
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if x,y in a or x,y in b or x,y in c:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
d=[a,b,c]
for i in d:
    if x in i and y in i:
        print('Yes')
        exit()
print('No')
A = input()
B = input()
C = input()

xa = 0
xb = 0
xc = 0

h = 'A'
k = A[0] #最初の１枚を抜く
xa += 1

while True:
    #抜いたカードに書かれている文字に注目
    # 次の手番は A だった
    if k == 'a':
        h = 'A'
        # xa はこの時点で 2、len(A)が 1 なら A の勝ち
        if xa <= len(A):
            k = A[xa]
            xa += 1
        else:
            break
    elif k == 'b':
        h = 'B'
        xb += 1
        if xb <= len(B):
            k = B[xb]
            xb += 1
        else:
            break
    else:
        h = 'C'
        xc += 1
        if xc <= len(C):
            k = C[xc]
            xc += 1
        else:
            break

print(h)


### FIXED CODE ###

A = input()
B = input()
C = input()

xa = 0
xb = 0
xc = 0

h = 'A'
k = A[0] #最初の１枚を抜く
xa += 1

while True:

    if k == 'a':
        h = 'A'
        if xa < len(A):
            k = A[xa]
            xa += 1
        else:
            break
    elif k == 'b':
        h = 'B'
        xb += 1
        if xb < len(B):
            k = B[xb]
            xb += 1
        else:
            break
    elif k == 'c':
        h = 'C'
        xc += 1
        if xc < len(C):
            k = C[xc]
            xc += 1
        else:
            break

print(h)
# encoding:utf-8
import functools as ft
import math

def main():
	N, K = list(map(int, input().split()))
	nums = list(map(int, input().split()))

	max_num = max(nums)
	g = ft.reduce(lambda x, y: math.gcd(x, y), nums)

	if K <= max_num and K % g == 0:
		return("POSSIBLE")
	else:
		return("IMPOSSIBLE")

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

### FIXED CODE ###

import functools as ft

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

def main():
	N, K = list(map(int, input().split()))
	nums = list(map(int, input().split()))

	max_num = max(nums)
	g = ft.reduce(lambda x, y: gcd(x, y), nums)

	if K <= max_num and K % g == 0:
		print("POSSIBLE")
	else:
		print("IMPOSSIBLE")

if __name__ == '__main__':
	main()
#b.py
n = int(input())
lis = [list(input().split())+[x] for x in range(n)]
lis = sorted(lis,key=lambda x:x[0])
now = lis[0][0]
ans_lis = []
sublis = []
for x in lis:
    if x[0] == now:
        sublis.append(x)
    else:
        now = x[0]
        sublis = sorted(sublis,key=lambda x:int(x[1]),reverse=True)
        print(int(x[1]))
        ans_lis.append(sublis)
        sublis = []
        sublis.append(x)
for x in ans_lis:
    print(x[2]+1)



### FIXED CODE ###

#b.py
n = int(input())
lis = [list(input().split())+[x] for x in range(n)]
lis = sorted(lis,key=lambda x:x[0])
now = lis[0][0]
ans_lis = []
sublis = []
for x in lis:
    if x[0] == now:
        sublis.append(x)
    else:
        now = x[0]
        sublis = sorted(sublis,key=lambda x:int(x[1]),reverse=True)
        ans_lis.append(sublis)
        sublis = []
        sublis.append(x)
sublis.sort(key=lambda x:int(x[1]),reverse=True)
ans_lis.append(sublis)
sublis = []
sublis.append(x)       
ans_lis = [item for sublist in ans_lis for item in sublist]
for x in ans_lis:
    print(x[2]+1)
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = np.array(map(int, raw_input().split()))

odd = t[0::2]
even = t[1::2]

np.unique(odd, return_counts=True)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np
from collections import Counter
N = input()
t = np.array(map(int, raw_input().split()))

odd = t[0::2]
even = t[1::2]
rest = 0

co = Counter(odd)
ce = Counter(even)

omc = co.most_common()
emc = ce.most_common()

if omc[0][0] == emc[0][0]:
    if len(omc) < 2 and len(emc) < 2:       # same
        rest = len(even)
    elif len(omc) < 2:
        rest = len(even)
    elif len(emc) < 2:
        rest = len(odd)
    else:
        or1 = len(odd) - co.most_common()[0][1]
        or2 = len(odd) - co.most_common()[1][1]
        er1 = len(even) - ce.most_common()[0][1]
        er2 = len(even) - ce.most_common()[1][1]

        if or1 + er2 > or2 + er1:
            rest = or2 + er1
        else:
            rest = or1 + er2
else:
    rest = len(odd) - co.most_common()[0][1] + len(even) - ce.most_common()[0][1]


print rest
a,b, k = map(int,input().split())
 
lis = list(range(a,b+1))
 


if (b-a+1)>= 2*k:
    for i in lis:
        if (i >= a and i <a+k) or (i <=b and b-k < i):
            print(i)
else:
    for i in range(a,b+1):
        print(i)

### FIXED CODE ###

a,b,k = map(int, input().split())
if k*2+a-1<=b:
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)
else:
    for i in range(a,b+1):
        print(i)
import sys
input = sys.stdin.readline
N = int(input())
sum = 0
li = [1] * 100010
for i in range(N) :
    A = int(input())
    if li[A] == 1 :
        sum +=1
        li[A] = 0
    else :
        li[A] = 1
        sum -=1
print(sum)

### FIXED CODE ###

n=int(input())
s=set()
for i in range(n):
    a=int(input())
    if a in s:
        s.remove(a)
    else:
        s.add(a)
print(len(s))
# yahoo-procon2019-qualC - When I hit my pocket...
import sys
sys.setrecursionlimit(10 ** 9)


def hit(k, c, m):
    if k == 0:
        return c
    ret = []
    ret += [hit(k - 1, c + 1, m)]
    if c >= A:
        ret += [hit(k - 1, c - A, m + 1)]
    if m > 0:
        ret += [hit(k - 1, c + B, 0)]
    return max(ret)


K, A, B = list(map(int, input().rstrip().split()))
print(hit(K, 1, 0))

### FIXED CODE ###

# yahoo-procon2019-qualC - When I hit my pocket...
def main():
    k, a, b = list(map(int, input().rstrip().split()))
    if b - a <= 2 or k < a - 1:
        print(k + 1)
        return

    ans, k = a, k - (a - 1)
    if k % 2 == 1:
        k -= 1
        ans += 1
    ans += (b - a) * k // 2
    print(ans)


if __name__ == "__main__":
    main()
n,k=map(int,input().split())
x=list(map(int,input().split()))
x.append(0)
x.sort()
x_0=x.index(0)

if x_0 == 0:
    print(x[k])
elif x_0==n:
    print(-x[-k-1])
else:
    r = min(n-x_0-1, k)
    l = min(x_0, k)
    ans1=float("inf")
    ans2=float("inf")
    #スタートで正に移動
    for i in range(1,r):
        s = 2*x[x_0 + i] - x[x_0 - (k-i)]
        ans1=min(ans1, s)
    for i in range(1,l):
        s = -2*x[x_0 - i] + x[x_0 + (k-i)]
        ans2=min(ans2, s)
    print(min(ans1, ans2))


### FIXED CODE ###

n,k=map(int,input().split())
x=list(map(int,input().split()))
x.append(0)
x.sort()
x_0=x.index(0)

if x_0 == 0:
    print(x[k])
elif x_0==n:
    print(-x[-k-1])
else:
    r = min(n-x_0, k)
    l = min(x_0, k)
    ans1=float("inf")
    ans2=float("inf")
    #スタートで正に移動
    for i in range(1,r+1):
        if  k-i <= l:
            s = 2*x[x_0 + i] - x[x_0 - (k-i)]
            ans1=min(ans1, s)
    #スタートで負に移動
    for i in range(1,l+1):
        if k-i <= r:
            s = -2*x[x_0 - i] + x[x_0 + (k-i)]
            ans2=min(ans2, s)
    print(min(ans1, ans2))
string = str(input())

pairs = 0
limit = len(string)-4
secondLimit = len(string)
substringArray = list()
substringArray.append(string[0])
for i in range(1, secondLimit):
  substringArray.append(substringArray[i-1] + string[i])

for i in range(0,limit):
  for j in range(i+3,secondLimit):
    if int(substringArray[j][i:]) % 673 == 0:
      pairs += 1
print(pairs)

### FIXED CODE ###

number = str(input())[::-1]
remainderDictionary = {0: 1}
    
sum = 0
x = 1
for i in number:
  x = (x * 10) % 2019
  sum += int(i) * x
  sum %= 2019
  remainderValue = remainderDictionary.get(sum,0) + 1
  remainderDictionary[sum] = remainderValue
     
ans = 0
for i in remainderDictionary:
  value = remainderDictionary[i]
  ans += value * (value - 1) // 2 # N C 2
print(ans)
N = int(input())
graph = {}
root = -1
for n in range(N-1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1

    if root == -1:
        root = u
    if u not in graph:
        graph[u] = {}
    if v not in graph:
        graph[v] = {}
    graph[u][v] = w
    graph[v][u] = w    

answer = [-1] * N
def search(node, depth):
    answer[node] = depth
    for n in graph.get(node, {}):
        if answer[n] == -1:
            search(n,depth + graph[node][n])
if N == 1:
    print('0')
else:
    search(root, 0)
    for a in answer:
        print('0' if a % 2 else '1')

### FIXED CODE ###

N = int(input())
graph = {}
root = -1
for n in range(N-1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1

    if root == -1:
        root = u
    if u not in graph:
        graph[u] = {}
    if v not in graph:
        graph[v] = {}
    graph[u][v] = w
    graph[v][u] = w    

answer = [-1] * N
queue = [[root, 0]]
counter = -1
while counter < N - 1:
    counter += 1
    node = queue[counter][0]
    depth = queue[counter][1]
    answer[node] = depth
    for n in graph[node]:
        if answer[n] == -1:
            queue.append([n, depth + graph[node][n]])

for a in answer:
   print('0' if a % 2 else '1')
C = input()

abc ='abcdefghijklmnopqrstuvwxyz'

print(abc[abc.index(C+1))]

### FIXED CODE ###

C = input()

abc ='abcdefghijklmnopqrstuvwxyz'

print(abc[abc.index(C) +1])
# /usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math


## input
N,C = map(int, input().split())
Cn = [[0 for j in range(10**5+1)] for i in range(C)]
An = [0 for j in range(10**5*2+1)]
for i in range(N):
  s,t,c = map(int, input().split())
  if Cn[c-1][s*2] == -1:
    An[s*2] += 1
  else:
    An[s*2-1] += 1
  An[t*2] -= 1

  Cn[c-1][s] += 1
  Cn[c-1][t] -= 1

for i in range(1,10**5*2+1):
  An[i] += An[i-1]

print(max(An))

### FIXED CODE ###

# /usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math


## input
N,C = map(int, input().split())
Cn = [[0 for j in range(10**5+1)] for i in range(C)]
An = [0 for j in range(10**5+1)]
for i in range(N):
  s,t,c = map(int, input().split())
  if Cn[c-1][s] == -1:
    An[s] += 1
  else:
    An[s-1] += 1
  if Cn[c-1][t] == 1:
    An[t-1] -= 1
  else:
    An[t] -= 1    

  Cn[c-1][s] += 1
  Cn[c-1][t] -= 1

for i in range(1,10**5+1):
  An[i] += An[i-1]

print(max(An))
a,b = map(int,input().split())
b1 = 0
b2 = 0
b3 = 0
s = 0
s1 = 0
s2 = 0
t = 0
t1 = 0
u = 0
if b>=10000:
	s = b // 10000
	b1 = b - s*10000
    if 5000<=b1<10000:
        b2 = b1 - 5000
        s1 = b2 // 1000
        if (s + 1 + s1) <= a:
            print(s,1,s1)
        else:
            print(-1,-1,-1)
elif 5000<=b<10000:
    t = b // 5000
    b3 = b - t*5000
    t1 = b3 // 1000
    if (t + t1) <= a:
        print(0,t,t1)
    else:
        print(-1,-1,-1)
elif b<5000:
    u = b // 1000
    if u <= a:
        print(0,0,u)
    else:
        print(-1,-1,-1)
    


### FIXED CODE ###

N,Y = map(int,input().split())
c = 0
for i in range(0,N+1):
    for j in range(0,N+1):
        c = ((Y-(10000*i+5000*j))/1000)
        if c.is_integer and c >= 0 and i+j+c == N:
            d = int(c)
            print(i,j,d)
            exit()
print(-1,-1,-1)
from collections import deque
N,M=list(map(int,input().split()))
A=[list(map(int,input().split())) for i in range(M)]
graph=[[]for i in range(N+1)]
for i in range(N):
    u,v=A[i]
    graph[u].append(v)
    graph[v].append(u)

stack=deque([1])
visited=[-1 for i in range(N+1)]
visited2=[-1 for i in range(N+1)]
visited[1]=0
while stack:
    x=stack.popleft()
    for i in graph[x]:
        if visited[i]==-1:
            visited[i]=visited[x]+1
            visited2[i]=x
            stack.append(i)
print('Yes')
print(*visited2[2:],sep='\n')

### FIXED CODE ###

from collections import deque
N,M=list(map(int,input().split()))
A=[list(map(int,input().split())) for i in range(M)]
graph=[[]for i in range(N+1)]
for i in range(M):
    u,v=A[i]
    graph[u].append(v)
    graph[v].append(u)

stack=deque([1])
visited=[-1 for i in range(N+1)]
visited2=[-1 for i in range(N+1)]
visited[1]=0

while stack:
    x=stack.popleft()
    for i in graph[x]:
        if visited[i]==-1:
            visited[i]=visited[x]+1
            visited2[i]=x
            stack.append(i)
print('Yes')
print(*visited2[2:],sep='\n')