Harryxun/stf_run huggingface dataset:
A = input()
B = input()
C = input()

owner = 'a'

while True:
    if owner == 'a'
        if len(A):
            owner = A[0]
            del(A[0])
        else:
            print('a')
            break
    if owner == 'b'
        if len(B):
            owner = B[0]
            del(B[0])
        else:
            print('b')
            break
    if owner == 'c'
        if len(C):
            owner = C[0]
            del(C[0])
        else:
            print('c')
            break

### FIXED CODE ###

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

owner = 'a'

while True:
    if owner == 'a':
        if len(A):
            owner = A[0]
            del(A[0])
        else:
            print('A')
            break
    if owner == 'b':
        if len(B):
            owner = B[0]
            del(B[0])
        else:
            print('B')
            break
    if owner == 'c':
        if len(C):
            owner = C[0]
            del(C[0])
        else:
            print('C')
            break
import math

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

ans = 0

"i点の時、k点以上になるためにはlog2(k/i)回連続で表を出す必要がある"
for i in range (1:n + 1):
  if i < k:
    omote = math.ceil(math.log(k/i, 2))
    ans += (1/2) **(omote)
  else :
    ans += 1
print(ans/n)


### FIXED CODE ###

import math
 
n, k = list(map(int, input().split()))
 
ans = 0
 
"i点の時、k点以上になるためにはlog2(k/i)回連続で表を出す必要がある"
for i in range (1, n + 1):
  if i < k:
    omote = math.ceil(math.log(k/i, 2))
    ans += (1/2) **(omote)
  else :
    ans += 1
print(ans/n)
import fraction
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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

lcm_num = lcm(N,M)

X_s = ["" for i in range(lcm_num)]
X_t = ["" for i in range(lcm_num)]

# print(X_s,X_t)

for i in range(N):
    tmp = i*lcm_num // N + 1
    X_s[tmp-1] = S[i]


for i in range(M):
    tmp = i*lcm_num // M + 1
    X_t[tmp-1] = T[i]

# print(X_s,X_t)

for s,t in zip(X_s,X_t):
    if s == "" or t == "" :
        continue
    elif s == t:
        continue
    else:
        print(-1)
        exit()

print(lcm_num)


### FIXED CODE ###

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

def lcm(x, y):
    return (x * y) // gcd(x, y)

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

lcm_num = lcm(N,M)
lN = lcm_num // N
lM = lcm_num // M
gcd_num = lN * lM

for i in range(0,lcm_num,gcd_num):
    if S[i//lN] == T[i//lM]:
        continue
    else:
        print(-1)
        exit()

print(lcm_num)
N=int(input())
a1=list(map(int,input(). split ()))
x=1
if 0 in A:
    print(0)
    return
for a in A:
    x=x*a
    if x>1e18:
        print(-1)
        return
print(x)


### FIXED CODE ###

A,B=(map(int,input().split()))
print(A*B)
a,b,c,d = map(int.input().split())
s1 = a*b
s2 = c*d
if s1 >= s2:
  print(s1)
else:
  print(s2)

### FIXED CODE ###

a,b,c,d = map(int,input().split())
s1 = a*b
s2 = c*d
if s1 >= s2:
  print(s1)
else:
  print(s2)
# -*- coding: utf-8 -*-
import sys


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


def main(N, DATA):
    dp = [[0 for _ in range(N)] for _ in range(N + 1)]

    for i in range(N):
        for j in range(N):
            for k in range(N):
                if j == k:
                    continue
                dp[i + 1][k] = max(dp[i + 1][k], dp[i][j] + DATA[i][k])

    res = 0

    for v in range(N):
        res = max(res, dp[N][v])

    return res


if __name__ == '__main__':
    N = int(input())
    DATA = [map(int, input().split()) for i in range(N)]

    
    r = main(N, DATA)
    print(r)


### FIXED CODE ###

import sys

input = sys.stdin.readline

vacation = int(input())
lst_happiness = [list(map(int, input().split())) for i in range(vacation)]

dp = [[0 for i in range(3)] for j in range(vacation+1)]
def chmax(a, b):
    if a > b:
        return a
    else:
        return b

for i in range(vacation):
    for j in range(3):
        for k in range(3):
            if j == k:
                continue
            dp[i+1][k] = chmax(dp[i+1][k], dp[i][j] + lst_happiness[i][k])
ans = 0
for i in range(3):
    ans = chmax(ans, dp[vacation][i])
print(ans)
r,g,b = map(int,input().split())
if (10*g + b) % 4 = 0:
  print("YES")
else:
  print("No")

### FIXED CODE ###

r,g,b = map(int,input().split())
if (10*g + b) % 4 == 0:
  print("YES")
else:
  print("NO")
n = int(input())
s = list(n)

if n % sum(s) == 0:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

n = int(input())
s = sum(map(int, list(str(n))))

if n % s == 0:
  print("Yes")
else:
  print("No")
from collections import defaultdict as dd
from bisect import bisect_left as bl
s = input()
t = input()
ind = dd(list)
res = 0
for i in range(len(s)):
  ind[s[i]].append(i)
#print(ind)
for i in range(len(t)):
  if len(ind[t[i]]) == 0:
    print(-1)
    exit(0)
  temp = bl(ind[t[i]], res % len(s))
  #print(temp, res, t[i])
  if res % len(s) == ind[t[i]][temp]:
    temp += 1
  if temp == len(ind[t[i]]):
    res += (len(s) - res % len(s)) + ind[t[i]][0]
  else:
    res += ind[t[i]][temp] - res % len(s)
print(res + 1)

### FIXED CODE ###

from collections import defaultdict as dd
from bisect import bisect_left as bl
s = input()
t = input()
ind = dd(list)
res = 0
first = 1
for i in range(len(s)):
  ind[s[i]].append(i)
#print(ind)
for i in range(len(t)):
  if len(ind[t[i]]) == 0:
    print(-1)
    exit(0)
  temp = bl(ind[t[i]], res % len(s))
  #print(temp, res, t[i])
  if first == 0:
    if res % len(s) == ind[t[i]][min(temp, len(ind[t[i]]) - 1)]:
      temp += 1
  first = 0
  if temp == len(ind[t[i]]):
    res += (len(s) - res % len(s)) + ind[t[i]][0]
  else:
    res += ind[t[i]][temp] - res % len(s)
print(res + 1)
S=[input()]

if S[0]==S[1]:
  print('Bad')
elif S[1]==S[2]:
  print('Bad')
elif S[2]==S[3]:
  print('Bad')
else:
  print('Good')
  



### FIXED CODE ###

s=list(input())

def judge(s):        
    for i in range(len(s)-1):
        if s[i]==s[i+1]:
            return 'Bad'
        else:
            continue
    return 'Good'
print(judge(s))
n = int(input())
a = map(int, input().split())
min_a = min(a)
max_a = max(a)
sum_a = max(a)
print(min_a, max_a, sum_a)

### FIXED CODE ###

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

min_a = min(a)
max_a = max(a)
sum_a = sum(a)

print(min_a, max_a, sum_a)
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

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

result = lcm(T[0],T[1])

for x in range(2,N):
    result = lcm(result, T[x])

print(result)
    


### FIXED CODE ###

N = input()
if N[0] == N[2]:
    print("Yes")
else:
    print("No")
import numpy as np
N = int(input())
list_ai = list(map(int,input().split()))
a1 = np.array(list_ai)-np.arange(1,N+1)
median1 = int(np.floor(np.median(a1)))
ans = np.sum(np.abs(a1-median1))
print(ans)


### FIXED CODE ###

N = int(input())
if N % 2 ==0:
  print(N)
else:
  print(2*N)
n=int(input())
T,X,Y=0,0,0


for i in range(n):
    t,x,y=map(int,input().split())
    if abs(s-X)+abs(y-Y)>t-T or t%2!=(x+y)%2:
        print('No')
        sys.exit()
    T,X,Y=t,x,y
print('Yes')


### FIXED CODE ###

N = int(input())
count = 0
T, X, Y = 0, 0, 0
for i in range(N):
    t, x, y = map(int, input().split())
    if abs(x-X)+abs(y-Y) <= t-T and t % 2 == (x+y) % 2:
        count += 1
    T, X, Y = t, x, y
if count==N:
    print('Yes')
else:
    print('No')
h,w = map(int,input().split())
S = [list(input()) for i in range(h)]
stack = [[0,0]]
S[0][0] = 0

total_dot = 0
for sss in S:
    for s in sss:
        if s == ".":
            total_dot += 1

move = [[0,1],[1,0],[-1,0],[0,-1]]
cnt = 1
while stack:
    cur_stack = stack
    stack = []
    for si,sj in cur_stack:
        for mi,mj in move:
            i,j = si+mi,sj+mj
            if 0 > i or i >= h or 0 > j or j >= w:
                continue
            next_mass = S[i][j]
            if next_mass == "#":
                continue
            elif next_mass == ".":
                S[i][j] = cnt
                stack.append([i,j])
    cnt += 1
# [print(s) for s in S]
print(total_dot-S[-1][-1])

### FIXED CODE ###

h,w = map(int,input().split())
S = [list(input()) for i in range(h)]
stack = [[0,0]]
S[0][0] = 0

total_dot = 0
for sss in S:
    for s in sss:
        if s == ".":
            total_dot += 1

move = [[0,1],[1,0],[-1,0],[0,-1]]
cnt = 1
while stack:
    cur_stack = stack
    stack = []
    for si,sj in cur_stack:
        for mi,mj in move:
            i,j = si+mi,sj+mj
            if 0 > i or i >= h or 0 > j or j >= w:
                continue
            next_mass = S[i][j]
            if next_mass == "#":
                continue
            elif next_mass == ".":
                S[i][j] = cnt
                stack.append([i,j])
    cnt += 1
# [print(s) for s in S]
print(total_dot-S[-1][-1]) if S[-1][-1] != "." else print(-1)
n = input()
print((n*(n+1))/2)

### FIXED CODE ###

n = int(input())
print(int((n*(n+1))/2))
a,d = map(int,input().split())
if n == 100:
    print(101 * (100**d))
else:
    print(n * (100**d))

### FIXED CODE ###

d,n = map(int,input().split())
if n == 100:
    print(101 * (100**d))
else:
    print(n * (100**d))
S = map(int,input())

if S[0]=S[1] or S[1]=S[2] or S[2]=S[3] or S[3]=S[4] :
	print('Bad')
else:
	print('Good')

### FIXED CODE ###

S = input()
 
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3] :
	print('Bad')
else:
	print('Good')
import numpy as np
W,H,x,y = map(int,input().split())
min_s = H*(W-2*x)
ts = H*x
flag = 0 
for d in range(0,360,0.5):
    if(d == 90 or d == 270):
        continue
    rad = np.deg2rad(d)
    a = np.tan(rad)
    h = a*W - 2*a*x + 2*y
    men = (a*x-y+h/2)*W
    s = round(abs(W*H - 2 * men),9)
    if min_s > s:
        min_s = s
        ts = men
    elif min_s == s:
        flag = 1
    
print(ts,flag)

### FIXED CODE ###

W,H,x,y = map(int,input().split())

flag = 0
if(x == W/2 and y == H/2):
    flag = 1
    
print(W*H/2,flag)
s=raw_input()
K=int(raw_input())
s=list(s)
#a-z 97-122
for i, s_ in enumerate(s):
    if s_!='a':
        if ord(s_)+K >= 123:
            s[i]='a'
            K -= (123-ord(s_))
if K>0:
    asc=ord(s[-1])+K%26
    s[-1]=chr(asc)
print"".join(s)

### FIXED CODE ###

# -*- coding: utf-8 -*-
raw = raw_input()

ans =  raw[:4]+' '+raw[4:]

print ans
a,b,c = [int(i) for i in input().split()]
print("YES" if b-a==c-b "NO")

### FIXED CODE ###

a,b,c = [int(i) for i in input().split()]
print("YES" if b-a==c-b else "NO")
n,m = map(int,input().split())
a=[]
b=[]
c=[]
d=[]
for i in range(n):
    a1,b1=map(int,input().split())
    a.append(a1)
    b.append(b1)
for i in range(m):
    c1,d1=map(int,input().split())
    c.append(c1)
    d.append(d1)
for i in range(n):
    min_len = 100000000
    for j in range(m):
        len = abs(c[j]-a[i])+abs(d[j]-b[i])
        if len < min_len:
            min_len=len
            cnt = j+1
    print(cnt)

### FIXED CODE ###

n,m = map(int,input().split())
a=[]
b=[]
c=[]
d=[]
for i in range(n):
    a1,b1=map(int,input().split())
    a.append(a1)
    b.append(b1)
for i in range(m):
    c1,d1=map(int,input().split())
    c.append(c1)
    d.append(d1)
for i in range(n):
    min_len = 1000000000
    cnt = None
    for j in range(m):
        len = abs(c[j]-a[i])+abs(d[j]-b[i])
        if len < min_len:
            min_len=len
            cnt = j+1
    print(cnt)
n,k = map(int,input().split())
h = [int(input()) for i in range(n)]
h.sort()
ans = h[-1]

for i in range(n-k+1):
    if h[i+k-1] - h[i] < ans:
        ans = h[i+2] - h[i]

print(ans)

### FIXED CODE ###

n,k = map(int,input().split())
h = [int(input()) for i in range(n)]
h.sort()
ans = 10 ** 10

for i in range(n-k+1):
    ans = min(h[i+k-1] - h[i],ans)

print(ans)
R=int(input())
if R<1200:
  print("ABC")
elsif R<2800:
  print("ARC")
else:
  print("AGC")


### FIXED CODE ###

R=int(input())
if R<1200:
  print("ABC")
elif R<2800:
  print("ARC")
else:
  print("AGC")
# coding:utf-8
import math
X = int(input())
if X < 100:
  print("0")
  exit()
c = 0
x2 = X%100
for i in range(100000):
  x = 0
  if x2/5 > 1 :
    x = math.floor(x2/5)
    x2 -= 5*x
    five = 5*x
  elif x2 / 4 >= 1 :
    x = math.floor(x2/4)
    x2 -= 4*x
    four = 4*x
  elif x2 / 3 >= 1 :
    x = math.floor(x2/3)
    x2 -= 3*x
    three = 3*x
  elif x2 / 2 >= 1 :
    x = math.floor(x2/2)
    x2 -= 2*x
    two = 2*x
  elif x2 / 1 == 1 :
    x = math.floor(x2/1)
    x2 -= 1*x
    one = 1*x
  c += x
  if x2 == 0:
    break
if c == 0 or X >= c*100:
  print("1")
else :
  print("0")

### FIXED CODE ###

# coding:utf-8
m1,d1 = list(map(int, input().split()))
m2,d2 = list(map(int, input().split()))
if m1 != m2:
  print("1")
else:
  print("0")
x, y = input().split()

for kame in range(0, x+1):
    tsuru = x - kame
    legs = kame * 4 + tsuru * 2
    if legs == y:
        print("Yes")
        break
else:
    print("No")


### FIXED CODE ###

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

for kame in range(0, x+1):
    tsuru = x - kame
    legs = kame * 4 + tsuru * 2
    if legs == y:
        print("Yes")
        break
else:
    print("No")
import sys
input = sys.stdin.readline

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

q = []
checked = [-1]*N
for n in range(N):
    if len(graph[n]) == 1:
        q.append(n)
        checked[n] = 0

ok = False
while q:
    posiq = []
    for p in q:
        update = False
        for np in graph[p]:
            if checked[np] == -1:
                checked[np] = checked[p] + 1
                update = True
                posiq.append(np)
            elif checked[np] == checked[p] + 1:
                ok = True
                break
            elif checked[np] == checked[p]:
                update = True
        if not update:
            ok = True
            break
    
    q = set()
    for p in posiq:
        for np in graph[p]:
            if checked[np] == -1 and not np in q:
                c = 0
                for mp in graph[np]:
                    if checked[mp] == -1:
                        c += 1
                    if c >= 2: break
                if c <= 1:
                    q.append(np)
    for np in q:
        checked[np] = checked[p] + 1

print("First" if ok else "Second")            


### FIXED CODE ###

import sys
input = sys.stdin.readline

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

q = []
checked = [-1]*N
for n in range(N):
    if len(graph[n]) == 1:
        q.append(n)
        checked[n] = 0

ok = False
while q:
    posiq = []
    for p in q:
        update = False
        for np in graph[p]:
            if checked[np] == -1:
                checked[np] = checked[p] + 1
                update = True
                posiq.append(np)
            elif checked[np] == checked[p] + 1:
                ok = True
                break
            elif checked[np] == checked[p]:
                update = True
        if not update:
            ok = True
            break
    
    q = set()
    for p in posiq:
        for np in graph[p]:
            if checked[np] == -1 and not np in q:
                c = 0
                for mp in graph[np]:
                    if checked[mp] == -1:
                        c += 1
                    if c >= 2: break
                if c <= 1:
                    q.add(np)
    for np in q:
        checked[np] = checked[p] + 1

print("First" if ok else "Second")
from collections import deque
H,W=map(int,input().split())
L=[]
cnt=0
for i in range(H+2):
    if i==0 or i==H+1:
        S="#"*(W+2)
    else:
        S=input()
        S="#"+S+"#"
    L1=[]
    for j in range(W+2):
        if S[j]==".":
            cnt+=1
        L1.append(S[j])
    L.append(L1)
L[1][1]=0
D=deque()
D.append([1,1])
h=[0,1,0,-1]
w=[1,0,-1,0]
i=0
for i in range(10000):
    #print(D)
    #print(L)
    if D[0][0]==H and D[0][1]==W:
        print(cnt-L[H][W]-1)
        exit()
    for k in range(3):
        if L[D[0][0]+h[k]][D[0][1]+w[k]]==".":
            if [D[0][0]+h[k],D[0][1]+w[k]] not in D:
                D.append([D[0][0]+h[k],D[0][1]+w[k]])
            L[D[0][0]+h[k]][D[0][1]+w[k]]=L[D[0][0]][D[0][1]]+1
            
        elif L[D[0][0]+h[k]][D[0][1]+w[k]]=="#":
            pass
        else:
            if L[D[0][0]+h[k]][D[0][1]+w[k]]>L[D[0][0]][D[0][1]]+1:
                L[D[0][0]+h[k]][D[0][1]+w[k]]=L[D[0][0]][D[0][1]]+1
    D.popleft()

### FIXED CODE ###

H,W=map(int,input().split())

A=[]
a=["#"]*(W+2)
A.append(a)
for i in range(H):
    s=input()
    s="#"+s+"#"
    A.append(list(s))
A.append(a)
#幅優先探索
#print(A)
P=[[1,1]]
A[1][1]=1
x=[1,-1,0,0]
y=[0,0,1,-1]
while P!=[]:
    #print(P)
    for j in range(4):
        if A[P[0][0]+x[j]][P[0][1]+y[j]]=="#":
            pass
        elif A[P[0][0]+x[j]][P[0][1]+y[j]]==".":
            A[P[0][0]+x[j]][P[0][1]+y[j]]=A[P[0][0]][P[0][1]]+1
            P.append([P[0][0]+x[j],P[0][1]+y[j]])
        elif A[P[0][0]+x[j]][P[0][1]+y[j]]<=A[P[0][0]][P[0][1]]+1:
            pass
        else:
            A[P[0][0]+x[j]][P[0][1]+y[j]]=A[P[0][0]][P[0][1]]+1
            P.append([P[0][0]+x[j],P[0][1]+y[j]])
    del P[0]
S=0
for i in range(H+2):
    for j in range(W+2):
        if A[i][j]=="#":
            S+=1
if A[H][W]==".":
    print(-1)
else:
    print((H+2)*(W+2)-S-A[H][W])
A , B = map(int, input().split())

if 1 <= A and A <= 9 and 1 <= B and B <= 9:
  print(A * B)
else:
  print(-1)

### FIXED CODE ###

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

if 1 <= A and A <= 9 and 1 <= B and B <= 9:
  print(A * B)
else:
  print(-1)
ef north(list):
    List = []
    List.append(list[1])
    List.append(list[5])
    List.append(list[2])
    List.append(list[3])
    List.append(list[0])
    List.append(list[4])
    return List

def west(list):
    List = []
    List.append(list[2])
    List.append(list[1])
    List.append(list[5])
    List.append(list[0])
    List.append(list[4])
    List.append(list[3])
    return List
    
def south(list):
    List = []
    List.append(list[4])
    List.append(list[0])
    List.append(list[2])
    List.append(list[3])
    List.append(list[5])
    List.append(list[1])
    return List

def east(list):
    List = []
    List.append(list[3])
    List.append(list[1])
    List.append(list[0])
    List.append(list[5])
    List.append(list[4])
    List.append(list[2])
    return List

dice = list(map(int, input().split()))
x = str(input())
y = list(x)
for i in range(len(x)):
    if y[i] == 'N':
        dice[0:5] = north(dice)
    elif y[i] == 'W':
        dice[0:5] = west(dice)
    elif y[i] == 'S':
        dice[0:5] = south(dice)
    elif y[i] == 'E':
        dice[0:5] = east(dice)
print(dice[0])



### FIXED CODE ###

def north(list):
    List = []
    List.append(list[1])
    List.append(list[5])
    List.append(list[2])
    List.append(list[3])
    List.append(list[0])
    List.append(list[4])
    return List

def west(list):
    List = []
    List.append(list[2])
    List.append(list[1])
    List.append(list[5])
    List.append(list[0])
    List.append(list[4])
    List.append(list[3])
    return List
    
def south(list):
    List = []
    List.append(list[4])
    List.append(list[0])
    List.append(list[2])
    List.append(list[3])
    List.append(list[5])
    List.append(list[1])
    return List

def east(list):
    List = []
    List.append(list[3])
    List.append(list[1])
    List.append(list[0])
    List.append(list[5])
    List.append(list[4])
    List.append(list[2])
    return List

dice = list(map(int, input().split()))
x = str(input())
y = list(x)
for i in range(len(x)):
    if y[i] == 'N':
        dice[0:5] = north(dice)
    elif y[i] == 'W':
        dice[0:5] = west(dice)
    elif y[i] == 'S':
        dice[0:5] = south(dice)
    elif y[i] == 'E':
        dice[0:5] = east(dice)
print(dice[0])
suits = [('S', 0), ('H', 1), ('C', 2), ('D', 3)]

def tonum(suit):
    for i in range(4):
        if suit == suits[i][0]: return suits[i][1]

def tosuit(num):
    return suits[num][0]

def main():
    n = int(input())
    cards = [i for i in range(52)]
    for i in range(n):
        a = input().split()
        cards.remove(tonum[a[0]] * 13 + int(a[1]))
    cards.reverse()
    for i in cards:
        print(tosuit(i // 13) + " " + (i % 13))
    
        
        







if __name__ == "__main__":
    main()


### FIXED CODE ###

def tonum(suit):
    if suit == 'S': return 0
    if suit == 'H': return 1
    if suit == 'C': return 2
    if suit == 'D': return 3
    
def tosuit(num):
    suits = ['S', 'H', 'C', 'D']
    return suits[num]
    
def main():
    n = int(input())
    cards = [i for i in range(52)]
    for i in range(n):
        a = input().split()
        cards.remove(tonum(a[0]) * 13 + int(a[1]) - 1)
    cards.sort()
    for i in cards:
        print(tosuit(i // 13) + " " + str(i % 13 + 1))
    
if __name__ == "__main__":
    main()
n,k=map(int,input().split())
lists=[]
for _ in range(k):
  d=input()
  if d==1:
    list=[int(input())]
  else:
    list=list(map(int,input().split()))
  lists.append(list)
ans=[0]*n
for list in lists:
  for i in range(1,len(list)+1):
    ans[i-1]+=1
count=0
for h in ans:
  if h==0:
    count+=1
print(count)

### FIXED CODE ###

n,k=map(int,input().split())
lists=[]
for _ in range(k):
  d=int(input())
  lis=list(map(int,input().split()))
  lists.append(lis)
ans=[0]*n
for list in lists:
  for i in range(len(list)):
    ans[list[i]-1]+=1
count=0
for h in ans:
  if h==0:
    count+=1
print(count)
from collections import deque
import sys
sys.setrecursionlimit(16000)
N, M = map(int, input().split())
graph = [[] for j in range(M)]
q = deque([])
depth_array = [-1 for i in range(N)]

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

def bfs(graph, q, depth_array):
    # 終了条件
    if len(q) == 0:
        return depth_array

    cur_room = q.popleft()

    # キューに追加
    for r in graph[cur_room]:
        if depth_array[r] == -1: #未訪問なら
            q.append(r)
            depth_array[r] = depth_array[cur_room] + 1

    return bfs(graph, q, depth_array)
    
# init
q.append(0)
depth_array[0] = 0
depth_array = bfs(graph, q, depth_array)

mark_array = [-1 for i in range(N)]
#print(depth_array)

for room, depth in enumerate(depth_array):
    for node in graph[room]:
        if depth_array[node] + 1 == depth_array[room]:
            mark_array[room] = node
if -1 in mark_array[1:]:
    print("No")
else:
    print("Yes")
    for m in mark_array[1:]:
        print(m+1)

### FIXED CODE ###

from collections import deque
import sys
sys.setrecursionlimit(200000)
N, M = map(int, input().split())
graph = [[] for j in range(N)]
q = deque([])
depth_array = [-1 for i in range(N)]

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

def bfs(graph, q, depth_array):
    # 終了条件
    if len(q) == 0:
        return depth_array

    cur_room = q.popleft()

    # キューに追加
    for r in graph[cur_room]:
        if depth_array[r] == -1: #未訪問なら
            q.append(r)
            depth_array[r] = depth_array[cur_room] + 1

    return bfs(graph, q, depth_array)
    
# init
q.append(0)
depth_array[0] = 0
depth_array = bfs(graph, q, depth_array)

mark_array = [-1 for i in range(N)]
#print(depth_array)

for room, depth in enumerate(depth_array):
    for node in graph[room]:
        if depth_array[node] + 1 == depth_array[room]:
            mark_array[room] = node

if -1 in mark_array[1:]:
    print("No")
else:
    print("Yes")
    for m in mark_array[1:]:
        print(m+1)
c = str(input())

alp = abcdefghijklmnopqrstuvwxyz

k=0
while k<25:
  if c == alp[k]:
    print(alp[k+1])
  else:
    k+=1
    

### FIXED CODE ###

c=input()
al='abcdefghijklmnopqrstuvwxyz'
for x in range(26):
    if c==al[x]:
        print(al[x+1])