Harryxun/stf_run huggingface dataset:
N = int(input())

chars = "0abcdefghijklmnopqrstuvwxyz"
a = ""
n_1 = N

while True:
    x = N % 26

    if x == 0:
        x = 26

    a += chars[x]
    n_1 -= x
    if n_1 == 0:
        break

    n_1 //= 26

print(a[::-1])

### FIXED CODE ###

a = input()

if str.isupper(a):
    print('A')
elif str.islower(a):
    print('a')
N = int(input())
K = int(input())
x = list(map(int, input().split()))
ans = 0
for i in range(N):
    ans.append(min(abs(0 - x[i]), abs(K - x[i])))
print(ans)

### FIXED CODE ###

N = int(input())
K = int(input())
x = list(map(int, input().split()))
ans = 0
for i in range(N):
    if abs(K - x[i]) > abs(x[i]):
        ans += 2 * x[i]
    else:
        ans += 2 * (K - x[i])
print(ans)
import math

mod = pow(10, 9) + 7

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

graph = {}

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

src = 1
E = []
vis_set = set()
depth = [0]*(n+1)
def dfs_eulerTour(src):
	global vis_set, depth
	vis_set.add(src)
	E.append(src)

	for neighbour in graph[src]:
		if not neighbour in vis_set:
			depth[neighbour] = depth[src] + 1
			dfs_eulerTour(neighbour)
			E.append(src)

dfs_eulerTour(src)
D = [depth[x] for x in E]
N = len(D)
def get_h():
	H = [-1]*(n+1)
	for i, ele in enumerate(E):
		if H[ele]==-1:
			vis_set.add(ele)
			H[ele] = i 
	return H
H = get_h()
M = [[0]*(int(math.log2(N))+1) for i in range(N+1)]

def preprocess(D, N, M):
	for i in range(N):
		M[i][0] = i

	for j in range(1, int(math.log2(N))+1):
		i = 0
		while i + (1 << j) - 1 < N:
			M[i][j] = M[i][j-1] if D[M[i][j-1]] <= D[M[i + (1 << (j-1))][j-1]] else M[i + (1 << (j-1))][j-1]
			i += 1
preprocess(D, N, M)

def get_dist(u, v):
	
	def RMQ(i, j):
		k = int(math.log2(j - i))
		return M[i][k] if D[M[i][k]] <= D[M[j - (1<<k)][k]] else M[j - (1<<k)][k]

	if H[u] == H[v]:
		return 0
	elif H[u]> H[v]:
		u, v = v, u
		q = RMQ(H[u], H[v])
		lca = E[q]
	else:
		q = RMQ(H[u], H[v])
		lca = E[q]
	return depth[u] + depth[v] - 2*depth[lca]

def free_verts(cur_vert, vis_set):
	count = sum(get_dist(cur_vert, other_vert)>2 for other_vert in vis_set)
	return count

def dfs(src):
	rem_color = k
	vis_set = {src,}
	stack = [src]
	color = [1]*(n+1)
	color[src] = k
	rem_color -= 1
	res = k
	while stack:
		v = stack.pop()
		for neighbour in graph[v]:
			if not neighbour in vis_set:
				vis_set.add(neighbour)
				stack.append(neighbour)
				add = free_verts(neighbour, vis_set)
				# print(neighbour, vis_set, add)
				color[neighbour] = (max(rem_color, 0) + add)%mod
				res = (res*color[neighbour])%mod
				rem_color -= 1
	return res
ans = dfs(src)
print(ans)

### FIXED CODE ###

from collections import defaultdict

mod = pow(10, 9) + 7

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

graph = defaultdict(list)

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

def dfs(v):
	global graph, k
	ans = k	# k choices of color for root
	stack = [v]
	vis_set = {v, }

	while stack:
		v = stack.pop()
		if v==0: 
			avail_count = k-1
		else: 
			avail_count = k-2
		for nxt in graph[v]:
			if nxt not in vis_set:
				if avail_count <= 0:
					return 0
				ans = (ans*avail_count)%mod
				avail_count -= 1
				stack.append(nxt)
				vis_set.add(nxt)
	return ans

ans = dfs(0)
print(ans)
lists = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(lists(k+1))

### FIXED CODE ###

lists = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(int(lists[k-1]))
N = int(input())

p = input().split(' ')
ans = 1
for i in range(N):
    if int(p[i])==i):
        ans += 1

print(ans//2)


### FIXED CODE ###

N = int(input())

p = input().split(' ')
ans = 0
for i in range(N):
    if int(p[i]) == i+1:
        if not(i==N-1) and not(p[i+1] ==i+1):
            rrr = p[i]
            p[i] = p[i+1]
            p[i+1] = rrr
            ans +=1
        else:
            rrr = p[i]
            p[i]=p[i-1]
            p[i-1] =rrr
            ans +=1

print(ans)
#print(p)
N = int(input())
A = list(map(int,input().split()))
 
cnt = 0
while True:
  check = sum([n % 2 for n in A])
  if check == 0:
    A = [n/2 for n in A]
    cnt += 1
  else:
    break
    
print(cnt)

### FIXED CODE ###

numbers = list(input())
count = 0
for s in numbers:
    a = int(s)
    if a == 1:
        count +=1
print(count)
A = int(input()) #¥500
B = int(input()) #¥100
C = int(input()) #¥50
X = int(input())
count = 0
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if a*500 + b*100 + c*50 == X:
        count += 1
print(count)

### FIXED CODE ###

X = int(input())
A = int(input())
B = int(input())

print((X-A) % B)
import math
n,k = map(int, input().split())

d = n - k

c = 10**9+7
for i in range(1,k+1,1):
    s = int(((math.factorial(k-1))*(math.factorial(d+1)))/((math.factorial(k-i))*(math.factorial(i-1))*(math.factorial(d-i+1))*(math.factorial(i))))
    print(s % c)

### FIXED CODE ###

import math

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

c = 10**9+7

def cmb(n,r):
    return math.factorial(n) // (math.factorial(n-r)*math.factorial(r))


for i in range(k):
    try:
        print(((cmb(k-1,i)*cmb(n - k+1,i+1))%c))
    except:
        print(0)
def wa(n,a,b):
  for i in range(1,n+1):
    s=str(i)
    for ii in s:
      ss+=int(ii)
    if a<=ss<=b:
      ans+=i
  return ans
n,a,b=map(int,input().split())
print(wa(n,a,b))  

### FIXED CODE ###

def wa(n,a,b):
  hoge=0
  ans=0
  for i in range(1,n+1):
    s=str(i)
    hoge=0
    for ii in s:
      hoge+=int(ii)
    if a<=hoge<=b:
      ans+=i
  return ans
n,a,b=map(int,input().split())
print(wa(n,a,b))
n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)

print('AC x ', c['AC'])
print('WA x ', c['WA'])
print('TLE x ', c['TLE'])
print('RE x ', c['RE'])

### FIXED CODE ###

import collections

n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)

print('AC x ', c['AC'])
print('WA x ', c['WA'])
print('TLE x ', c['TLE'])
print('RE x ', c['RE'])
letters = eval(input("Enter: "))
for i in letters:
	print("Yes" if i[2]==i[3] and i[4]==i[5] else "No")

### FIXED CODE ###

l = input()
print("Yes" if (l[2]==l[3] and l[4]==l[5]) else "No")
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()

X = AB[:N]
Y = AB[N:]

if any(x[0] == y[0] for x, y in zip(X, Y)):
    print('No')
    exit()

1 / 0

ans = [-1] * N

for (x, i, sx), (y, j, sy) in zip(X, Y):
    if sx == sy:
        if A[i] == B[i] or A[j] == B[j]:
            ans[i] = B[j]
            ans[j] = B[i]
        else:
            ans[i] = B[i]
            ans[j] = B[j]
    else:
        if sx == 1:
            i, j = j, i
        ans[i] = B[j]

assert not ans.count(-1), 'undefined'

print('Yes')
print(*ans)


### FIXED CODE ###

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

AB = [(a, i, 0) for i, a in enumerate(A)] + [(b, i, 1) for i, b in enumerate(B)]
AB.sort()

X = AB[:N]
Y = AB[N:]

if any(x[0] == y[0] for x, y in zip(X, Y)):
    print('No')
    exit()

swapA = []
swapB = []
ans = [-1] * N

for (_, i, sx), (_, j, sy) in zip(X, Y):
    if sx == sy == 0:
        swapA.append((i, j))
    elif sx == sy == 1:
        swapB.append((i, j))
    else:
        if sx == 0:
            ans[i] = B[j]
        else:
            ans[j] = B[i]

for (i, j), (x, y) in zip(swapA, swapB):
    ans[i] = B[x]
    ans[j] = B[y]

    if A[i] == ans[i] or A[j] == ans[j]:
        ans[i], ans[j] = ans[j], ans[i]

print('Yes')
print(*ans)
import math

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

a = int(a)
b = int(b)
c = int(c)

if math.isclose(math.sqrt(c) - math.sqrt(b) - math.sqrt(a), 0, abs_tol=1e-10):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if 4 * a * b < (c - a- b)**2 and c - a- b > 0:
    print("Yes")
else:
    print("No")
n = input()
print n**3
print \n

### FIXED CODE ###

n = input()
print n**3
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
mod=10*9+7
min=0
max=0
from math import factorial
for i in range(n-k):
   min+=(l[i]*(factorial(n-i-1)/factorial(k)/factorial(n-k-i-1)))%mod
   max+=(l[n-i-1]*(factorial(n-i-1)/factorial(k)/factorial(n-k-i-1)))%mod
   max=max%mod
   min=min%mod
print(int((max-min))%mod)


### FIXED CODE ###

n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
mod=10**9+7
n_max=2*10**5
F,FI=[0]*(n_max+1),[0]*(n_max+1)
F[0],FI[0]=1,1
for i in range(n_max):
  F[i+1]=(F[i]*(i+1))%mod
  FI[i+1]=pow(F[i+1],mod-2,mod)
def comb(x,y):
  return (F[x]*FI[x-y]*FI[y])%mod
total=0
for i in range(n-k+1):
   f=comb(n-i-1,k-1)%mod
   total+=int((l[n-i-1]-l[i])*f)
   total%=mod
print(total)
import sys
input = sys.stdin.readline

class UnionFind:
    def __init__(self, n):
        self.data = [0] * N
        self.dd = [{i} for i in range(N)]
        for i in range(N):
            self.data[i] = i
            
    def get_root(self, x):
        r = self.data[x]
        if r == x:
            return r
        p = self.get_root(r)
        self.data[x] = p
        
        self.dd[x].add(p)
        self.dd[p].add(x)
        
        return p
    
    def unite(self, x, y):
        rx = self.get_root(x)
        ry = self.get_root(y)
        
        if rx != ry:
            self.data[rx] = ry

            self.dd[x].add(y)
            self.dd[y].add(x)
            
    def same(self, x, y):
        return self.get_root(x) == self.get_root(y)

N, K, L = map(int, input().split())
LA = [[int(v) - 1 for v in input().split()] for _ in range(K)]
LB = [[int(v) - 1 for v in input().split()] for _ in range(K)]

u1 = UnionFind(N)
for x, y in LA:
    u1.unite(x, y)
    
u2 = UnionFind(N)
for x, y in LB:
    u2.unite(x, y)
    
result = [0] * N
for i in range(N):
    a = u1.get_root(i)
    b = u2.get_root(i)
    
    result[i] = len(u1.dd[a] & u2.dd[b])
    
print(" ".join(map(str, result)))


### FIXED CODE ###

import sys
input = sys.stdin.readline

class UnionFind:
    def __init__(self, n):
        self.data = [0] * N
        for i in range(N):
            self.data[i] = i
            
    def get_root(self, x):
        r = self.data[x]
        if r == x:
            return r
        p = self.get_root(r)
        self.data[x] = p
        
        return p
    
    def unite(self, x, y):
        rx = self.get_root(x)
        ry = self.get_root(y)
        
        if rx != ry:
            self.data[rx] = ry

    def same(self, x, y):
        return self.get_root(x) == self.get_root(y)

N, K, L = map(int, input().split())
LA = [[int(v) - 1 for v in input().split()] for _ in range(K)]
LB = [[int(v) - 1 for v in input().split()] for _ in range(L)]

u1 = UnionFind(N)
for x, y in LA:
    u1.unite(x, y)
    
u2 = UnionFind(N)
for x, y in LB:
    u2.unite(x, y)

result = {}
for i in range(N):
    a = u1.get_root(i)
    b = u2.get_root(i)
    
    if result.get((a, b)) == None:
        result[(a, b)] = 0
    result[(a, b)] += 1
    
for i in range(N):
    a = u1.get_root(i)
    b = u2.get_root(i)
    
    print(result[(a, b)], end = "")
    if i != N - 1:
        print(" ", end = "")
    else:
        print()
N = int(input())

if N % 2 == 1:
  print(0)
else:
  tmp = 2
  ans = 0
  while 5 * tmp <= N:
    tmp *= 5
    ans = ans + N // tmp
print(ans)

### FIXED CODE ###

N = int(input())

if N % 2 == 1:
  print(0)
  exit()
else:
  tmp = 2
  ans = 0
  while 5 * tmp <= N:
    tmp *= 5
    ans = ans + N // tmp
print(ans)
S=list(input())
q=len(S)//2+1
i=0
K="Yes"
for i in range (0,q):
    if S[2*i]=="L":
        K="No"
        break
    elif S[2*i+1]=="R":
        K="No"
        break
    else:
        continue
print(K)
        
        


### FIXED CODE ###

S=list(input())
K="Yes"
for i in range (0,len(S)):
	if i%2==0:
		if S[i]=="L" :
			K="No"
			break
		else:
			continue
	else :
		if S[i]=="R" :
			K="No"
			break
		else:
			continue
print(K)
N, M = map(int, input().split())
A = list(map(int, input().split()))

dp = [-1] * (N+1)
need = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
dp[0] = 0

for i in range(N+1):
    for j in A:
        if i + need[j] > N:
            continue
        dp[i+need[j]] = max(dp[i+need[j]], dp[i]*10+j])
print(dp[N])

### FIXED CODE ###

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

dp = [-1] * (N+1)
need = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
dp[0] = 0

for i in range(N+1):
    for j in A:
        if i + need[j] > N:
            continue
        dp[i+need[j]] = max(dp[i+need[j]], dp[i]*10+j)
print(dp[N])
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=sys.stdin.readline
def resolve():
    s=input()
    n=len(s)
    ans=0
    from itertools import product
    for A in product(range(2),repeat=n-1):
        k=s[0]
        for i in range(n-1):
            k+='+' if A[i] else ''
            k+=s[i+1]
        ans+=eval(k)
    print(ans)
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
# input=sys.stdin.readline
def resolve():
    s=input()
    n=len(s)
    ans=0
    from itertools import product
    for A in product(range(2),repeat=n-1):
        k=s[0]
        for i in range(n-1):
            k+='+' if A[i] else ''
            k+=s[i+1]
        ans+=eval(k)
    print(ans)
resolve()
import numpy as np

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

keiro = np.eye(n)
ab = []
for i in range(m):
  a,b = [int(i)-1 for i in input().split()]
  ab.append([a, b])
  keiro[a,b] = 1
  keiro[b,a] = 1

for i in range(m):
  cnt = 0
  a,b = ab[i]
  keiro[a,b] = 0
  keiro[b,a] = 0
  
  eig, p = np.linalg.eig(keiro)
  p_inv = np.linalg.inv(p)
  eig = eig**(m-i-1)
  d = np.diag(eig)
  keiro_tmp = np.dot(p,d)
  keiro_tmp = np.dot(keiro_tmp,p_inv)
  cnt = int(np.sum(keiro_tmp == 0) / 2)
  print(cnt)

### FIXED CODE ###

n,m = [int(i) for i in input().split()]
ab = []
for i in range(m):
  ab.append([int(i)-1 for i in input().split()])

def find_index(c,eld):
  if c in eld[c]:
    return(c,len(eld[c]))
  else:
    return(eld[c][0],len(eld[eld[c][0]]))
           
eld = []
for i in range(n):
  eld.append([i])
stat = eld
ans = [int(len(eld)*(len(eld)-1)/2)]

for a,b in ab[1:][::-1]:
#  print(eld)
  a_index,a_size = find_index(a,eld)
  b_index,b_size = find_index(b,eld)
#  print(a_index,b_index)
  if a_index == b_index:
    ans.append(ans[-1])
    continue
  else:
    next = a_size * b_size
    ans.append(ans[-1] - next)

  if a_size >= b_size:
    eld[a_index].extend(eld[b_index])
    for i in eld[b_index]:
      eld[i] = [a_index]
  else:
    eld[b_index].extend(eld[a_index])
    for i in eld[a_index]:
      eld[i] = [b_index]

for i in ans[::-1]:
  print(i)
n = int(input())
for _ in range(n):
    a,b,c = map(int,input().split())
    A.append(a)
    B.append(b)
    C.append(c)
dp = [[0]*3 for i in range(n)]
dp[0][0] = A[0]
dp[0][1] = B[0]
dp[0][2] = C[0]
for i in range(1,n):
    dp[i][0] = max(dp[i-1][1]+A[i],dp[i-1][2]+A[i])
    dp[i][1] = max(dp[i-1][0]+B[i],dp[i-1][2]+B[i])
    dp[i][2] = max(dp[i-1][0]+C[i],dp[i-1][1]+C[i])
print(max(dp[-1]))

### FIXED CODE ###

n = int(input())
A = []
B = []
C = []
for i in range(n):
    a,b,c = map(int,input().split())
    A.append(a)
    B.append(b)
    C.append(c)
    
dp = [[0 for i in range(3)] for j in range(n)]

dp[0][0] = A[0]
dp[0][1] = B[0]
dp[0][2] = C[0]

for i in range(1,n):
    dp[i][0] = max(dp[i-1][1],dp[i-1][2])+A[i]
    dp[i][1] = max(dp[i-1][0],dp[i-1][2])+B[i]
    dp[i][2] = max(dp[i-1][0],dp[i-1][1])+C[i]

print(max(dp[n-1][0],dp[n-1][1],dp[n-1][2]))
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    if a[i] == i+1:
        a[i], a[i+1] = a[i+1], a[i]
        ans += 1
print(ans)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n-1):
    if a[i] == i+1:
        a[i], a[i+1] = a[i+1], a[i]
        ans += 1
if a[-1] == n:
    ans += 1
print(ans)
#!/usr/bin/env python3

s = str(int(input()))
k = int(input())


for i in range(k):
    if s[i] != "1":
        print(s[i])
        exit()

print(s[i+1])

# if s[0] == "1":
#     if k == 1:
#         print(1)
#     else:
#         print(s[1])
# else:
#     print(s[0])


### FIXED CODE ###

#!/usr/bin/env python3

s = str(int(input()))
k = int(input())


for i in range(k):
    if s[i] != "1":
        print(s[i])
        exit()

print(s[i])

# if s[0] == "1":
#     if k == 1:
#         print(1)
#     else:
#         print(s[1])
# else:
#     print(s[0])
N = int(input())
H = [0] + [map(int, input().split())]

dp = [0]*(N+1)
dp[1] = H[1]
for i in range(2, N+1):
    dp[i] = min(dp[i-1]+abs(H[i]-H[i-1]), dp[i-2]+abs(H[i]-H[i-2]))
print(dp[N])


### FIXED CODE ###

N = int(input())
h = list(map(int,input().split()))
dp = [0] * N
for i in range(1, N):
    if i == 1:
        dp[i] = abs(h[1] - h[0])
    else:
        dp[i] = min(abs(h[i] - h[i-1])+dp[i-1], abs(h[i] - h[i-2])+dp[i-2])
print(dp[N-1])
N=int(input())
A=list(map(int,input().split()))
flag=0
answer=1
if A[0]<A[1]:
    flag=1
else:
    flag=-1
for n in range(N-1):
    if flag==1:
        if A[n]<=A[n+1]:
            pass
        else:
            flag=0
            answer+=1
    elif flag==-1:
        if A[n]>=A[n+1]:
            pass
        else:
            flag=0
            answer+=1
    else:
        if A[n]==A[n+1]:
            pass
        elif A[n]<A[n+1]:
            flag=1
        else:
            flag=-1
print(answer)


### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
flag=0
answer=1
if N==1:
    print(1)
else:
    if A[0] < A[1]:
        flag = 1
    elif A[0]>A[1]:
        flag = -1
    for n in range(N - 1):
        if flag == 1:
            if A[n] <= A[n + 1]:
                pass
            else:
                flag = 0
                answer += 1
        elif flag == -1:
            if A[n] >= A[n + 1]:
                pass
            else:
                flag = 0
                answer += 1
        else:
            if A[n] == A[n + 1]:
                pass
            elif A[n] < A[n + 1]:
                flag = 1
            else:
                flag = -1
    print(answer)
S = input()
targets = ['dream', 'dreamer', 'erase', 'eraser']


def fn(i):
    if len(S) == i:
        print('YES')
        exit()
    for tg in targets:
        if S[i: i + len(tg)] == tg:
            fn(i + len(tg))


fn(0)
print('No')


### FIXED CODE ###

S = input()
targets = ['dream', 'dreamer', 'erase', 'eraser']

i = len(S)
while True:
    if i == 0:
        print('YES')
        exit()
    for tg in targets:
        if S[i - len(tg):i][::-1] == tg[::-1]:
            i -= len(tg)
            break
    else:
        print('NO')
        exit()
N = int(input())
A = list(map(int, input().split()))

import numpy as np

ans = 0
for i in range(N):
    if len(A_re) == 0:
        ans = 0
        break
        break
    c = [j for j in A[i]/np.array(A) if j.is_integer() ]
    #print(c)
    if len(c) == 1:
        ans += 1
print(ans)

### FIXED CODE ###

from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
p = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    t = x * 2
    while t <= 10 ** 6:
        p[t] = False
        t += x
ans = 0
for x in a:
    if c[x] == 1 and p[x] == True:
        ans += 1
print(ans)
n = int(input())
a = list(map(int, input().split()))

arr = [0]*(n+1)
for i in range(n):
    arr[a[i]] += 1

from scipy.special import comb
base = comb(5, 3, exact=True)

c = [0]*(n+1)
for i in range(n+1):
    c[i] = int(comb(arr[i],2))

d = [0]*(n+1)
for i in range(n+1):
    d[i] = int(comb(arr[i]-1,2))


for k in range(n):
    ans = sum(c[:a[k]]) + sum(c[a[k]+1:]) + d[a[k]]
    print(ans)


### FIXED CODE ###

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

nums = [0] * (max(a) + 1)
for i in range(len(a)):
    nums[a[i]] += 1

from scipy.special import comb

all = 0
for i in range(len(nums)):
    all += comb(nums[i], 2, exact=True)

for k in range(n):
    print(all - (nums[a[k]] - 1))
def main():
  size = int(input())
  array[0] = list(map(int, "3 1 2".split())
  array[1] = list(map(int, "6 1 1".split())
                    
  flg = "Yes"           
  now = [0, 0, 0]
  for i in range (size):
    time = array[i][0] - now[0]
    distance = abs(array[i][1]-now[1]) + abs(array[i][2]-now[2])
    
    if time == distance or ((distance<time) and (time-distance)%2 == 0):
      now = array[i]
    else:
      flg = "No"
                    
  print(flg)
                    
main()

### FIXED CODE ###

def main():
  size = int(input())
  array = []
  for i in range(size):
    array.append(list(map(int, input().split())))
                    
  flg = "Yes"           
  pre_time = 0
  pos = [0, 0] 
  for i in range (size):
    time = array[i][0] - pre_time
    distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1])
    
    if time == distance or ((distance<time) and (time-distance)%2 == 0):
      pre_time = array[i][0]
      pos = array[i][1:]
    else:
      flg = "No"
                    
  print(flg)
                    
main()
class node:
    def __init__(self,parent):
        self.parent=parent

def findset(x):
    global nodes
    if nodes[x].parent==x:
        return x
    else:
        nodes[x].parent=findset(nodes[x].parent)

def unite(x,y):
    global rank,nodes
    findset(x)
    findset(y)
    if rank[nodes[x].parent]<rank[nodes[y].parent]:
        nodes[nodes[x].parent].parent=nodes[nodes[y].parent].parent
    elif rank[nodes[x].parent]==rank[nodes[y].parent]:
        nodes[nodes[x].parent].parent=nodes[nodes[y].parent].parent
        rank[y]+=1
    else:
        nodes[nodes[y].parent].parent=nodes[nodes[x].parent].parent

def same(x,y):
    global nodes
    findset(x)
    findset(y)
    if nodes[x].parent==nodes[y].parent:
        print(1)
    else:
        print(0)

n,q=map(int,raw_input().split())
rank=[0]*n
nodes=[]
for i in xrange(n):
    fac=node(i)
    nodes.append(fac)
for i in xrange(q):
    com,x,y=map(int,raw_input().split())
    if com==0:
        unite(x,y) 
    else:
        same(x,y)
        

### FIXED CODE ###

# -*- coding: utf-8 -*-
class UnionFind:
    def __init__(self,size):
        self.parent=range(size)#???????????????????????????
        self.tree_num=size#??¨????????¨?????°
        self.tree_w=[1]*size#????????????????????????????±???????????????¨??????????????°
        self.rank=[0]*size#??¨?????????

    def findset(self,x):#????????¢????????????x??????????????§?????£???????????????????????????????????????
        if self.parent[x]==x:
            return x
        else:
            self.parent[x]=self.findset(self.parent[x])
            return self.parent[x]

    def unite(self,x,y):#x,y?????????
        x=self.findset(x)
        y=self.findset(y)
        if x==y:
            return
        if self.rank[x]<self.rank[y]:
            self.parent[x]=y
            self.tree_num-=1
            self.tree_w[y]+=self.tree_w[x]
        else:
            self.parent[y]=x
            self.tree_num-=1
            self.tree_w[x]+=self.tree_w[y]
            if self.rank[x]==self.rank[y]:
                self.rank[x]+=1

    def same(self,x,y):#x,y???????????¨????±????????????????????????????
        if self.findset(x)==self.findset(y):
            return True
        else:
            return False

    def tree_number(self):#??¨????????¨?????°
        return self.tree_num

    def tree_weight(self,x):#x????±?????????¨??????????????°
        return self.tree_w[self.findset(x)]

n,q=map(int,raw_input().split())
uf=UnionFind(n)
for i in xrange(q):
    com,x,y=map(int,raw_input().split())
    if com==0:
        uf.unite(x,y)
    else:
        if uf.same(x,y):
            print(1)
        else:
            print(0)
w=input()
s=[0]*123
while(len(w)==0):
    for i in range(97,97+26):
        if chr(i)==w[0]:
        s[i]+=1
        w=w[1:]
c=1
for i in range(97,97+26):
    if s[i]%2==0:
        continue
    else:
        c=0
        break
if c=1:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

w=input()
s=[0]*123
for i in range(len(w)):
    s[ord(w[i-1])]+=1
c=1
for i in range(97,97+26):
    if s[i]%2==1:
        c=0
        break
if c==1:
    print("Yes")
else:
    print("No")