Harryxun/stf_run huggingface dataset:
abc = ['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']
li = [0 for a in range(len(abc))]

while True:
    a = raw_input()
    if a != '':
        for a in list(a):
            if a.lower() in abc:
                tmp = abc.index(a.lower())
                li[tmp] = li[tmp] + 1
    else:
        break

for a in range(len(abc)):
    print abc[a] + ' : ' + str(li[a])

### FIXED CODE ###

import string
az = list(string.ascii_lowercase)
li = [0 for a in range(len(az))]

while True:
    try:
        a = raw_input()
        for b in list(a):
            if b.lower() in az:
                tmp = az.index(b.lower())
                li[tmp] = li[tmp] + 1
    except:
        break

for c in range(len(az)):
    print az[c] + ' : ' + str(li[c])
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]

ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]

i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())

ii2ss = lambda n: [sys.stdin.readline() for _ in range(n)]

def main(N, Q, S, lrs):
    S2 = [0] * (N+1)
    for i in range(N):
        if S[i] == 'A' and S[i+1] == 'C':
            S2[i+1] = S2[i] + 1
        else:
            S2[i+1] = S2[i]
    print(S2)
    for l, r in lrs:
        count = S2[r-1] - S2[l-1] 
        print(count)

N, Q = i2nn()
S = i2s()
lr = ss2nnn(ii2ss(Q))
main(N, Q, S, lr)


### FIXED CODE ###

import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]

ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]

i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())

ii2ss = lambda n: [sys.stdin.readline() for _ in range(n)]

def main(N, Q, S, lrs):
    S2 = [0] * (N)
    for i in range(1, N):
        if S[i-1] == 'A' and S[i] == 'C':
            S2[i] = S2[i-1] + 1
        else:
            S2[i] = S2[i-1]
    for l, r in lrs:
        count = S2[r-1] - S2[l-1] 
        print(count)

N, Q = i2nn()
S = i2s()
lr = ss2nnn(ii2ss(Q))
main(N, Q, S, lr)
n = map(int, input())
a = []
new_a = []

for k in n:
    a[k] = map(str, input())

for k in n:
    new_a[k] = ''.join(list(reversed(a[k])))

sorted(new_a)

b = 0

for k in n:
    if(new_a[k] == new_a[k+1]):
        b = b +1
        
print(b)


### FIXED CODE ###

import math
n = int(input())
list_voc = [str(input()) for _ in range(n)]
list_mo = []
for i, s in enumerate(list_voc):
    list_n = list(s)
    list_n.sort()
    list_n = ''.join(list_n)
    list_mo.append(list_n)

ans = {}
for s in list_mo:
    if s in ans:
        ans[s] += 1
    else:
        ans[s] = 1


ans_val = []

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result


for s in ans:
    if ans[s] != 1:
        ans_val.append(cmb(ans[s], 2))


print(sum(ans_val))
import math
A,B,C,D = map(int,input().split())
def lcm(x, y):
    return (x * y)//math.gcd(x, y)
E = lcm(C, D)
sample = B-A
ans = sample - ((B//C-A//C) + (B//D-A//D)-(B//E-A//E))
print(ans)

### FIXED CODE ###

import fractions as f
a,b,c,d = map(int,input().split())
i = abs((a-1)//c-b//c)
j = abs((a-1)//d-b//d)
 
def lcm(x,y):
  return (x*y)//f.gcd(x,y)
l = lcm(c,d)
k = abs((a-1)//l-b//l)
print(b-a+1-(i+j-k))
n,x=map(int, input().split())
L=list(map(int, input().split()))

i=0
D=0
while(i<=n+1 and D<=x):
    D+=L[i]
    i+=1
print(i)

### FIXED CODE ###

n,x=map(int, input().split())
L=list(map(int, input().split()))

count=1
D=0
for move in L :
    D = D + move
    if D<=x:
        count+=1
    else:
        break
print(count)
N = int(input())
S = input()
Q = int(input())
ans = []
for _ in range(Q):
    query = input()
    if query[0] == "1":
        i = int(query[2])
        c = query[4]
        S = S[:i-1] + c + S[i:]
    else:
        l = int(query[2])
        r = int(query[4])
        ans.append(len(set(S[l-1:r])))
for a in ans:
    print(a)

### FIXED CODE ###

import bisect
import sys
input = sys.stdin.readline

def solve():
    N = int(input())
    S = list(input())
    Q = int(input())
    set_dic = {}

    for i, s in enumerate(S):
        if s not in set_dic:
            set_dic[s] = [i+1]
        else:
            bisect.insort_left(set_dic[s], i+1)

    anslist = []

    for _ in range(Q):
        query1, query2, query3 = input().split()
        if query1 == "1":
            i = int(query2)
            c = query3
            cap = S[i-1]
            if cap == c:
                continue
            set_dic[cap].remove(i)
            if c not in set_dic:
                set_dic[c] = [i]
            else:
                bisect.insort_left(set_dic[c], i)
            S[i-1] = c
        else:
            l = int(query2)
            r = int(query3)
            ansset = set()
            ans = 0
            for eachlist in set_dic.values():
                li = bisect.bisect_left(eachlist, l)
                ri = bisect.bisect_right(eachlist, r)
                if li != ri:
                    ans += 1
            anslist.append(ans)

    for i in anslist:
        print(i)

if __name__ == '__main__':
    solve()
def ABC137C_GreenBin():
    N = int(input().strip())
    S = [input().strip() for i in range(N)]

    ans = 0
    di = Counter()
    for s in S:
        s = ''.join(sorted(list(s)))
        
        if s in di:
            ans += di[s]

        di[s] += 1
    
    print(ans)


def main():
    ABC137C_GreenBin()

if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import Counter

def ABC137C_GreenBin():
    N = int(input().strip())
    S = [input().strip() for i in range(N)]

    ans = 0
    di = Counter()
    for s in S:
        s = ''.join(sorted(list(s)))
        
        if s in di:
            ans += di[s]

        di[s] += 1
    
    print(ans)


def main():
    ABC137C_GreenBin()

if __name__ == "__main__":
    main()
n=int(input())
a=list(map(int, input().split()))
a.sort()
m=a[n:2*n]
ans=sum(m)
for i in range(0,n,2):
    if m[i]+m[i+1]<=a[2*n+i]+a[n-i-1]:
        ans+= a[2*n+i]+a[n-i-1]-m[i]-m[i+1]
    else:break
print(ans)

### FIXED CODE ###

n=int(input())
a=sorted(list(map(int, input().split())))
print(sum(a[n::2]))
from collections import deque

if __name__ == '__main__':
	n = int(input())
	L = deque()

	for i in range(n):
		cmdline = input().split()

		if cmdline[0] == "insert":
			L.appendleft(cmdline[1])
		elif cmdline[0] == "delete":
			L.remove(cmdline[1])
		elif cmdline[0] == "deleteFirst":
			L.popleft()
		elif cmdline[0] == "deleteLast":
			L.pop()

	print(" ".join(L))

### FIXED CODE ###

from collections import deque
n = int(input())
L = deque()

for i in range(n):
    cmdline = input().split()

    if cmdline[0] == "insert":
        L.appendleft(cmdline[1])
    elif cmdline[0] == "delete":
        try:
            L.remove(cmdline[1])
        except ValueError: pass
    elif cmdline[0] == "deleteFirst":
        L.popleft()
    elif cmdline[0] == "deleteLast":
        L.pop()

print(" ".join(L))
import numpy as np


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

P = [None] * M
Y = [None] * M

X = [None] * (N + 1)
Y = [None] * (N + 1)

for n in range(N + 1):
    X[n] = []

for m in range(M):
    P[m], Y[m] = map(int, input().split())
    X[P[m]] = X[P[m]] + [Y[m]]

for i in range(len(X)):
    Y[i] = (np.argsort(np.array(X[i]))).tolist()

for p in P:
    print('%06d%06d' % (p, 1 + Y[p].pop(0)))


### FIXED CODE ###

from itertools import chain


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

P = [0] * N

I = list(range(M))

Q = [None] * M
Y = [None] * M

for m in range(M):
    Q[m], Y[m] = map(int, input().split())
    P[Q[m]-1] += 1

D = zip(I, Q, Y)
D = sorted(D, key=lambda x: [x[1], x[2]])
I, Q, Y = map(list, zip(*D))

P = list(chain.from_iterable([list(range(1, p+1)) for p in P]))

D = zip(I, Q, Y, P)
D = sorted(D, key=lambda x: x[0])
I, Q, Y, P = map(list, zip(*D))

for i in range(M):
    print('%06d%06d' % (Q[i], P[i]))
a = input()
if a >= 'a' && a <='z':
  print('a')
if a >= 'A' && a <='Z':
  print('A')

### FIXED CODE ###

a = input()
if a >= 'a' and a <='z':
  print('a')
if a >= 'A' and a <='Z':
  print('A')
from collections import Counter

N, M=map(int, input().split())
a = []
for i in range(N):
  b = []
  b = list(map(int, input().split()))
  del b[0]
  a.extend(b)
  
c=Counter(a)
    # すべての要素とその出現回数を取り出します。
freq_scores = c.most_common()
    #c.most_common内の最も多い要素[0]の最大出現回数[1]を[0][1]で指定
max_count = freq_scores[0][1]

modes = []
    　#出現回数と最大出現回数が等しいかを確認します。
for num in freq_scores:
	if num[1] == max_count:
    	modes.append(num[0])

print(len(a[modes]))


### FIXED CODE ###

A,B = map(int, input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)
import.math
A, B, C, D = map(int, input().split())
sita = A*30+B*0.5-B*6
sitas = 0
if sita > 180:
  sitas = 360 - sita
elif -180<= sita < 0:
  sitas = sita * -1
elif sita < -180:
  sitas = sita + 360
else:
  sitas = sita
sin = math.cos(str(sitas))
tan = C**2+D**2-2*C*D*sin
print(math.sqrt(tan))

### FIXED CODE ###

def resolve():
    import math
    A, B, H, M = map(int, input().split())
    sita = abs(H*30+M*0.5-M*6)
    if sita > 180:
        sita = 360 - sita
    print(math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(sita))))
resolve()
def R(xyrz,xyrz1):
	x, y, z, r  = xyrz
	x1,y1,z1,r1 = xyrz1
	return max(0,((x-x1)**2 + (y-y1)**2 + (z-z1)**2)**0.5 - r - r1)

while 1:
	n = input()
	if n == 0: break
	xyzr = [map(float,raw_input().split()) for i in range(n)]
	ans = 1e12
	for i in range(n):
		for j in range(i+1,n):
			l = R(xyzr[i],xyzr[j])
			if l < ans:
				ans = l
				s = [i,j]
	chain = [xyzr.pop(s[1]),xyzr.pop(s[0])]
	while xyzr:
		pipe = 1e12
		for i in range(len(xyzr)):
			for j in range(len(chain)):
				l = R(xyzr[i],chain[j])
				if l < pipe:
					pipe = l
					p = i
		ans += pipe
		chain.append(xyzr.pop(p))
	print ans

### FIXED CODE ###

inf = 1 << 28
def calc(xyzr1,xyzr2):
    x1,y1,z1,r1 = xyzr1
    x2,y2,z2,r2 = xyzr2
    d = ((x1-x2)**2+(y1-y2)**2+(z1-z2)**2)**0.5
    return max(0, d-r1-r2)
    
while 1:
    n = int(raw_input())
    if n == 0: break
    xyzr = [map(float,raw_input().split()) for i in xrange(n)]
    
    cost = [[0]*n for i in xrange(n)]
    for i in xrange(n):
        for j in xrange(n):
            cost[i][j] = cost[j][i] = calc(xyzr[i],xyzr[j])
    
    mincost = [inf]*n
    used = [False]*n
    mincost[0] = 0
    ans = 0
    while 1:
        v = -1
        for u in xrange(n):
            if not used[u] and (v == -1 or mincost[u] < mincost[v]): v = u
        if v == -1: break
        used[v] = True
        ans += mincost[v]
        for u in xrange(n):
            mincost[u] = min(mincost[u], cost[v][u])
    
    print "%.3f"%ans
a, b = map(int, input().split())]
if a <= b:
  print("unsafe")
elif a > b:
  print("safe")

### FIXED CODE ###

a, b = map(int, input().split())
if a <= b:
  print("unsafe")
else:
  print("safe")
n,m=map(int,input().split())
a=list(map(int,input().split()))
d=[]
cb=[[0]*2 for i in range(m)]
for i in range(m):
    bi,ci=map(int,input().split())
    cb[i]=[ci,bi]

a.sort()
cb.sort(reverse=True)

asum=0
isum=0
isumm=0
for i in range(m):
    isum+=cb[i][1]
#    print(i,isum,a[isum-1])
    if a[isum-1]<cb[i][0]:
        asum+=cb[i][0]*cb[i][1]
        isumm=isum
        continue
    else:
        ii=bisect(a,cb[i][0])
        asum+=cb[i][0]*(ii-isumm)
#        print(ii,isum,asum)
        asum+=sum(a[ii:isum])
        isumm=isum
        break
    
if isumm<n:
    asum+=sum(a[isumm:])
        
print(asum)


### FIXED CODE ###

import sys
from bisect import bisect_left,bisect,bisect_right

icase=0
if icase==0:
    n,m=map(int,input().split())
    a=list(map(int,input().split()))
    d=[]
    cb=[[0]*2 for i in range(m)]
    for i in range(m):
        bi,ci=map(int,input().split())
        cb[i]=[ci,bi]
elif icase==1:
    n,m=3,2
    a=[1, 4, 5]
    cb=[[5, 1], [3, 2]]
elif icase==3:
    n,m=3,2
    a=[100, 100, 100]
    cb=[[99, 3], [99, 3]]
elif icase==2:
    n,m=10,3
    a=[1, 4, 5, 5, 7, 8, 13, 33, 52, 100]
    cb=[[30, 4], [10, 3], [4, 1]]
elif icase==4:
    n,m=11,3
    a=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
    cb=[[1000000000, 4], [1000000000, 3], [1000000000, 3]]
elif icase==5:
    f=open(r"C:\Users\nishi\999atcoder\ABCD040-151\ABC127D\testcase_13_in.dat")
    ll=f.readline()
    n,m=map(int,ll.split())
    ll=f.readline()
    a=list(map(int,ll.split()))
    d=[]
    cb=[[0]*2 for i in range(m)]
    for i in range(m):
        ll=f.readline()
        bi,ci=map(int,ll.split())
        cb[i]=[ci,bi]
    f.close()
    ans=99913215738299
elif icase==6:
    f=open(r"C:\Users\nishi\999atcoder\ABCD040-151\ABC127D\testcase_12_in.dat")
    ll=f.readline()
    n,m=map(int,ll.split())
    ll=f.readline()
    a=list(map(int,ll.split()))
    d=[]
    cb=[[0]*2 for i in range(m)]
    for i in range(m):
        ll=f.readline()
        bi,ci=map(int,ll.split())
        cb[i]=[ci,bi]
    f.close()
    ans=95821339675952

a.sort()
cb.sort(reverse=True)

if cb[0][0]<=a[0]:
    print(sum(a))
    sys.exit()
    
asum=0
isum=0
isumm=0
for i in range(m):
    isum+=cb[i][1]
    if isum>n:
        if a[-1]<=cb[i][0]:
#        print("A",i)
            asum+=cb[i][0]*(n-isumm)
            print(asum)
            sys.exit()
#    isum=min(isum,n)
#    print(i,isum,a[isum-1])
        else:
#        print("C",i)
            ii=bisect_right(a,cb[i][0])
            asum+=cb[i][0]*(ii-isumm)
#        print(ii,isumm,asum)
#        asum+=sum(a[ii:isum])
            asum+=sum(a[ii:])
            print(asum)
            sys.exit()
    if a[isum-1]<=cb[i][0]:
        asum+=cb[i][0]*cb[i][1]
#        asum+=cb[i][0]*(isum-isumm)
#        print("B",i,isum,asum)
        isumm=isum
        continue
    else:
#        print("C",i)
        ii=bisect_right(a,cb[i][0])
        asum+=cb[i][0]*(ii-isumm)
#        print(ii,isumm,asum)
#        asum+=sum(a[ii:isum])
        asum+=sum(a[ii:])
        print(asum)
        sys.exit()
#        isumm=isum
#        break
    isumm=isum
    
#if isumm<n:
asum+=sum(a[isumm:])
        
print(asum)
n = int(input()) - 1
a = list(input())
while n and a:
    n -= 1
    a = [i for i in a if i in input()]
print(a)


### FIXED CODE ###

n = int(input())

cnt = [10000] * 26

for i in range(n):
    s = input()
    tmp = [0] * 26
    for c in s:
        tmp[ord(c) - ord('a')] += 1
    for j in range(26):
        cnt[j] = min(cnt[j], tmp[j])

a = ''
for i in range(26):
    if cnt[i]:
        a = a + chr(ord('a') + i) * cnt[i]
print(a)
import itertools
import numpy as np

N = int(input(''))
L = (list(map(int, input('').split(' '))))
L = np.array(sorted(L))
set_L = set(L)
if len(set_L) <= 2:
    print(0)
else:
    K = {i:len(L[L==i]) for i in set_L}
    
i = 0
for team in itertools.combinations(K.keys(), 3):
    if (team[0] < team[1] + team[2]) & (team[1] < team[0] + team[2]) & (team[2] < team[0] + team[1]):
        i += K[team[0]]*K[team[1]]*K[team[2]]
print(i)

### FIXED CODE ###

import itertools
import numpy as np

N = int(input(''))
L = (list(map(int, input('').split(' '))))
L = np.array(sorted(L))
set_L = set(L)

if len(set_L) <= 2:
    print(0)
else:
    K = {i:len(L[L==i]) for i in set_L}
    
    i = 0
    for team in itertools.combinations(K.keys(), 3):
        if (team[0] < team[1] + team[2]) & (team[1] < team[0] + team[2]) & (team[2] < team[0] + team[1]):
            i += K[team[0]]*K[team[1]]*K[team[2]]
    print(i)
n,k=map(int,input().split())
s=list(map(int,input().split()))
ans=0
cnt=0
for i in range(n-1):
  if a[i]==a[i+1]:
    ans+=1
  if a[i]!=a[i+1]:
    cnt+=1
ans=min(n-1,ans+min(cnt,k)*2)
print(ans)
    

### FIXED CODE ###

n,k=map(int,input().split())
a=input()
ans=0
cnt=0
for i in range(n-1):
  if a[i]==a[i+1]:
    ans+=1
  if a[i]!=a[i+1]:
    cnt+=1
ans=min(n-1,ans+min(cnt,k)*2)
print(ans)
import sys

args = [input() for i in range(6)]

for arg1 in args[:5]:
    for arg2 in args[1:5]
        if (arg2 - arg1) > args[5]:
            print(":(")
            sys.exit()
print("Yay!")

### FIXED CODE ###

import sys

loops1 = 4
loops2 = 5
arg1 = 0
arg2 = 1

i=0
j=0

args = [int(input()) for i in range(6)]

for i in range(arg1,loops1):
	for j in range(arg2,loops2):
		if (args[j] - args[i]) > args[5]:
			print(":(")
			sys.exit()
print("Yay!")
# N = list(map(int, input().split()))
# print(N[0], N[1], N[2])
# print(N[1])
# print(N[2])

N = int(input())
i = 2
a = 2
b = 1

while i <= N:
  c = a + b
  a = b
  b = c
  i = i + 1

print(c)


### FIXED CODE ###


N = int(input())
i = 2
a = 2
b = 1

if N == 1:
  print(1)
else:
  while i <= N:
    c = a + b
    a = b
    b = c
    i = i + 1

  print(c)
N, A, B = map(int, input().split())
ans = N // (A+B) * A
rem = n % (A+B)
ans += min(rem, A)
print(ans)

### FIXED CODE ###

N, A, B = map(int, input().split())
ans = N // (A+B) * A
rem = N % (A+B)
ans += min(rem, A)
print(ans)
n=int(input())
s=sum(list(str(n)))

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

### FIXED CODE ###

n=int(input())
sum=0
cnt=n

while cnt>0:
  sum+=cnt%10
  cnt//=10
  
if n%sum==0:
  print("Yes")
else:
  print("No")
N = input()
print(sum([n for n in range(1, N) if (n%3!=0) and (n%5!=0)]))

### FIXED CODE ###

n = int(input())

ans = 0
for i in range(n+1):
    if i % 3 != 0 and i % 5 != 0:
        ans += i
print(ans)
n = int(input())
x=[]
y=[]
h=[]
for i in range(0,n):
    a,b,c = map(int,input().split())
    x.append(a)
    y.append(b)
    h.append(c)
 
 
 
for i in range(0,101):
    for j in range(0,101):
        tmph=0
        flag = True
        for k in range(0,n):
            if tmph == 0 and h[k] != 0:
                tmph=abs(x[k]-i)+abs(y[k]-j)+h[k]
                break
            for k in range(0,n):
            calch = tmph - abs(x[k]-i)-abs(y[k]-j)
            if h[k] != max(calch,0)
                flag = False
                break
        if flag == False:
            continue
        elif tmph == 0:
            flag2 = True
            for c in range(0,101):
                if i == x[c] and j == y[c]:
                    flag2 = False
                    break
            if flag2:
                ansx = i
                ansy = j
                ansh = 1
        else:
            ansx=i
            ansy=j
            ansh=tmph
 
print(ansx,ansy,ansh)

### FIXED CODE ###

n = int(input())
x=[]
y=[]
h=[]
for i in range(0,n):
    a,b,c = map(int,input().split())
    x.append(a)
    y.append(b)
    h.append(c)
 
 
 
for i in range(0,101):
    for j in range(0,101):
        tmph=0
        flag = True
        for k in range(0,n):
            if tmph == 0 and h[k] != 0:
                tmph=abs(x[k]-i)+abs(y[k]-j)+h[k]
                break
        for k in range(0,n):
            calch = tmph - abs(x[k]-i)-abs(y[k]-j)
            if h[k] != max(calch,0):
                flag = False
                break
        if flag == False:
            continue
        elif tmph == 0:
            flag2 = True
            for c in range(0,101):
                if i == x[c] and j == y[c]:
                    flag2 = False
                    break
            if flag2:
                ansx = i
                ansy = j
                ansh = 1
        else:
            ansx=i
            ansy=j
            ansh=tmph
 
print(ansx,ansy,ansh)
N = int(input())
A = map(int, input().split())
s = 0
for i in range(N):
  s += 1/i
print(1/s)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
s = 0
for i in range(N):
  s += 1/A[i]
print(1/s)
a,b,c,d=map(int,input().split())
if !abs(a-b)>d&&!abs(b-c)>d:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a,b,c,d=map(int,input().split())
if abs (a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d):
    print("Yes")
else:
    print("No")
S=int(input())
print(S//3600,S//60%60,S%60,sep=":")


### FIXED CODE ###

while True:
	a,op,b=input().split()
	if op == "+":
		print(int(a)+int(b))
	elif op =="-":
		print(int(a)-int(b))
	elif op =="*":
		print(int(a)*int(b))
	elif op =="/":
		print(int(a)//int(b))
	else:
		break
N, K, Q = map(int, input().split())
A = []
for i in range(Q):
    A.append(int(input()))
score = [0]*N
init_score = [K]*N
for i in A:
    score[i] += 1
final_score = [init_score[i]-Q+score[i] for i in range(N)]
for i in final_score:
    print("Yes") if i > 0 else print("No")

### FIXED CODE ###

N, K, Q = map(int, input().split())
A = []
for i in range(Q):
    A.append(int(input()))
score = [0]*N
init_score = [K]*N
for i in A:
    score[i-1] += 1
final_score = [init_score[i]-Q+score[i] for i in range(N)]
for i in final_score:
    print("Yes") if i > 0 else print("No")
#Cut and Count

#ライブラリ
import copy

#入力
N = int(input())
S = list(input())
ans = []
#計算
for j in range(1,N-1,1):
	counter = 0
	S_hidari = []
	S_migi = []
	S_hidari = set(copy.copy(S[0:j]))
	S_migi = set(copy.copy(S[j:N]))
	for s_hidari in S_hidari:
		for s_migi in S_migi:
			if s_hidari == s_migi:
				counter += 1
	ans.append(counter)

#出力
print(max(ans))

### FIXED CODE ###

#Cut and Count

#ライブラリ
import copy

#入力
N = int(input())
S = list(input())
ans = []
#計算
for j in range(1,N-1,1):
	counter = 0
	S_hidari = []
	S_migi = []
	S_hidari = set(copy.copy(S[0:j]))
	S_migi = set(copy.copy(S[j:N]))
	for s_hidari in S_hidari:
		for s_migi in S_migi:
			if s_hidari == s_migi:
				counter += 1
	ans.append(counter)

#出力
if N == 2:
	if S[0] == S[1]:
		print("1")
	else:
		print("0")
	exit()
print(max(ans))
#!/usr/bin/env python
# -*- coding: utf-8 -*-


class Node(object):

  def __init__(self):
    self.edges = []
    self.distance = 1


def main():
  N = int(input())
  nodes = [Node() for _ in range(N)]

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

  leaves = [n for n in nodes if len(n.edges) == 1]

  while True:
    leaf = leaves.pop(0)
    parent = leaf.edges[0]

    if len(parent.edges) == 1:
      size = leaf.distance + parent.distance
      break

    parent.distance = max(parent.distance, leaf.distance + 1)
    parent.edges.remove(leaf)

    if len(parent.edges) == 1:
      leaves.append(parent)

  if size % 3 == 2:
    print('Second', flush=True)
  else:
    print('First', flush=True)


if __name__ == '__main__':
  main()



### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import collections


class Node(object):

  def __init__(self):
    self.edges = set()
    self.distance = 1


def main():
  N = int(input())
  nodes = [Node() for _ in range(N)]

  if N == 0:
    print('Second', flush=True)
    return
  elif N == 1:
    print('First', flush=True)
    return

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

  leaves = collections.deque(n for n in nodes if len(n.edges) == 1)

  while True:
    leaf = leaves.popleft()
    parent = leaf.edges.pop()

    if len(parent.edges) == 1:
      size = leaf.distance + parent.distance
      break

    parent.distance = max(parent.distance, leaf.distance + 1)
    parent.edges.remove(leaf)

    if len(parent.edges) == 1:
      leaves.append(parent)

  if size % 3 == 2:
    print('Second', flush=True)
  else:
    print('First', flush=True)


if __name__ == '__main__':
  main()
from math import sqrt

n = int(input())

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

x=[0]*n
y=[0]*n

for i in range(n):
    x[i], y[i] =map(int, input().split())

dis = 0

for i in range(n):
    for j in range(n):
        dis += distance(x[i], y[i], x[j], y[j])

dis = dis/n
print(dis)

### FIXED CODE ###

import math

n = int(input())

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)
distance_sum=0

c=[0]*n
for i in range(n):
    coordinate=list(map(int,input().split()))
    c[i]=coordinate


for i in range(n-1):
    for j in range(i+1,n):
        distance_sum+=distance(c[i][0],c[i][1],c[j][0],c[j][1])
    
distance_sum*=2
distance_sum*=(n-1)
distance_sum=distance_sum/(n*(n-1))

print(distance_sum)