peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n = int(input())
s = [0] * n
for i in range(n):
    s[i] = int(input())
ans = sum(s)
s.sort()
if ans % 10 == 0:
    for i in s:
        if (ans - i) % 10 != 0:
            print(ans-i)
            exit()
    print(0)
else:
    print(ans)
# Judge status: Wrong Answer
a, b, c = map(str, input().split())
max = int(a+b) + int(c)
if max < int(a) + int(b+c):
    max = int(a) + int(b+c)

print(max)
# Judge status: Accepted
N,T = map(int,input().split())
ans = 1001
ls = []
for i in range(N):
    ls.append(list(map(int,input().split())))
for i in ls:
    if i[1] <= T:
        ans = min(ans,i[0])
    else:
        continue
if ans == 1001:
    print('TLE')
else:
    print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
print('Odd' if a & 1 and b & 1 else 'Even')
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = {}
for i in range(n):
    c[i] = (a[i] - b[i])
ans = 0
for i in range(n):
    ans = max(ans,c[i])
num = 0
for i in range(n):
    if ans == (a[i]-b[i]):
        num = i
ch = 0
#print("num",num)
for i in range(n):
    if i <= num:
        ch += a[i]
    else:
        ch += b[i] 
print(ch+b[num])
# Judge status: Wrong Answer
import sys
L=int(input())

length=int(L/3)
L=L-length
width=int(L/2)
L=L-width
height=L
print(length*width*height)
# Judge status: Wrong Answer
s = input()
r = 'Yes'
for i in range(0, len(s) - 1, 2):
    if s[i] != 'h' or s[i + 1] != 'i':
        r = 'No'
        break
print(r)
# Judge status: Accepted
import sys

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

Ant = [a, b, c, d, e]

for i in range(4):
    for j in range(i, 5):
        if abs(Ant[j]-Ant[i]) > k:
            print(":(")
            sys.exit()

print("Yay!")
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))

ans = sum(B)
for i in range(len(A)-1):
    if A[i] + 1 == A[i+1]:
        ans += C[A[i]-1]

print(ans)
# Judge status: Accepted
a=input()
b=input().split()
sum=int(b[0])

for i in range(len(b)-1) :
  sum+=min(int(b[i]),int(b[i+1]))
sum+=int(b[-1])

print(sum)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))

c = 1
for a in A:
    c += a == c
print(n-c+1 if c > 1 else -1)
# Judge status: Accepted
import sys
input=sys.stdin.readline

n,m=map(int,input().split())
if n>=m:
    print(0)
    exit()

lst=sorted(map(int,input().split()))
sa=[]
for i in range(m-1):
    sa.append(lst[i+1]-lst[i])
sa=sorted(sa)
print(sum(sa[:m-n]))
# Judge status: Accepted
N = int(input())
A = [int(s) for s in input().split()]
mod = 10**9+7

wa = 0
wa_list = []
for i in range(N)[::-1]:
    if i == 0:
        break
    wa += A[i]
    wa_list.append(wa)

wa_list.reverse()
ans  = 0
for i in range(N-1):
    seki = A[i]*wa_list[i]
    ans += seki

print(ans % mod)
# Judge status: Accepted
v=['a','i','u','e','o'];print('vowel' if 0!=v.count(input()) else 'consonant')
# Judge status: Accepted
a, b, c = map(int, input().split())
ans = 3
if a == b or b == c or c == a:
    ans -= 1
if a == b == c:
    ans -= 1
print(ans)
# Judge status: Accepted
N = int(input())
ans = 100000
for A in range(N+1):
    num = 0
    B = N-A
    while A != 0:
        num  += A % 6
        A = A//6
    while B != 0:
        num  += B % 9
        B = B//9
    ans = min(ans,num)
print(ans)
# Judge status: Wrong Answer
x, y = map(int, input().split())
if (y-2*x) % 2 == 0 and 0 <= y-2*x <= x:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))


ans=0
for i in range(N):
  ans+=B[A[i]-1]
  if(i>=1):
    if(A[i]==A[i-1]+1):
      ans+=C[i-1]
      
print(ans)
# Judge status: Wrong Answer
s = input()

mx  = 0
n = len(s)
kensa = ["A", "C", "G", "T"]

for i in range(n):
    for j in range(i,n-1):
        mj = s[i:j+1]
        bl = True
        for l in range(len(mj)):
            if mj[l] not in kensa:
                bl = False
                break
        if bl & mx<len(mj):
           mx = len(mj)

print(mx)
# Judge status: Wrong Answer
def LI():
    return list(map(int, input().split()))


S, c = LI()
if S >= 2*c:
    ans = c//2
else:
    ans = S
    c -= 2*S
    ans += c//4
print(ans)
# Judge status: Accepted
#import math
#import collections
#n,k = map(int, input().split( ))
#A = list(map(int, input().split( )))
h = int(input())
w = int(input())
N = int(input())

m = max(h,w)
d = N//m
if N%m == 0:
  print(d)
else:
  print(d+1)
# Judge status: Accepted
n, k = map(int, input().split())
x = list(map(int, input().split()))
l = 0

ans = 10 ** 18
for r in range(k-1, len(x)):
    ans = min(ans, abs(x[l]) + abs(x[r] - x[l]))
    ans = min(ans, abs(x[r]) + abs(x[r] - x[l]))
    l += 1
print(ans)
# Judge status: Wrong Answer
from fractions import gcd

a,b = map(int,input().split())
n = gcd(a,b)
ans = 1
for i in range(2,n):
  if n%i == 0:
    ans += 1
  while n%i == 0:
    n = n//i
  if n == 1:
    break
print(ans)
# Judge status: Accepted
N=input()

num=0
for i in N:
    num+=int(i)

if num%9==0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
a,b,c=sorted(map(int,input().split()))
count=0
A,B=(c-a)//2,(c-b)//2
a+=A*2
b+=B*2
count+=A+B
if a==b==c:
    print(count)
elif a==b:
    print(count+1)
else:
    print(count+2)
# Judge status: Wrong Answer
N=input()
A="abcdefghij"

S=["a"]
for n in range(2,N+1):
    temp=[]
    for s in S:
        for i in range(n):
            if i==n-1:
                if s[-1]==A[i-1]:
                    temp.append(s+A[i])
            else:
                temp.append(s+A[i])
    S=temp

S.sort()
for x in S:
    print x
# Judge status: Accepted
lima = 0
tujuh = 0
a = [int(tmp) for  tmp in input().split()]
for i in range(3) :
  if a[i] == 5 :
    lima += 1
  elif a[i] == 7 :
    tujuh += 1
if lima==2 and tujuh == 1 :
  print("YES")
else :
  print('NO')
# Judge status: Accepted
k, x = map(int, input().split())
 
if x <= (k * 500):
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
input_line = input().split()
A = int(input_line[0])
B = int(input_line[1])
C = int(input_line[2])
D = int(input_line[3])

X = A//D
Y = C//B
if X > Y:
  print('Yes')
    
elif Y > X:
  print('No')

elif X ==Y:
  print('Yes')
# Judge status: Wrong Answer
import sys
s = input()
n = len(s)

if n %2 != 0:
    print('No')
    sys.exit()
for i in range(26): 
    if s.count(chr(i)) %2 != 0:
        print('No')
        sys.exit()
print('Yes')
# Judge status: Accepted
import numpy as np
n, k = [int(i) for i in input().split()]
h = np.array(sorted([int(i) for i in input().split()], reverse=True))
print(sum(h[k:]))
# Judge status: Wrong Answer
n = input()
print('Yes' if n[0] != n[1] and n[1] != n[2] and n[2] != n[3] else 'No')
# Judge status: Wrong Answer
a = int(input())
s = input()
if a > 3200:
  	print (s)
else:
    print("red")
# Judge status: Accepted
s = input()
t = input()

def match(k):
    flag = True
    for i in range(len(t)):
        if s[i + k] != t[i] and s[i + k] != "?":
            flag = False
            break
    return flag

flag = False
for k in reversed(range(len(s) - len(t) + 1)):
    if match(k):
        s = s[:k] + t + s[k + len(t):]
        flag = True
        break

if flag:
    print(s.replace('?', 'a'))
else:
    print('UNRESTORABLE')
# Judge status: Accepted
n = int(input())
lst = [2, 1]
for i in range(90):
  lst.append(lst[-1] + lst[-2])
print(lst[n])
# Judge status: Wrong Answer
A, B = map(int, input().split())
if A + B > 24:
    print((A + B) - 24)
else:
    print(A + B)
# Judge status: Accepted
N = int(input())
c_str = input()
R_cnt = c_str.count('R')
tmp_cnt = c_str[:R_cnt].count('R')
print(R_cnt - tmp_cnt)
# Judge status: Accepted
k,n=map(int,input().split())
a=list(map(int,input().split()))
lenmax=k-a[n-1]+a[0]
for i in range(n-1):
    if(lenmax<-1*(a[i]-a[i+1])):
        lenmax=-1*(a[i]-a[i+1])
print(k-lenmax)
# Judge status: Wrong Answer
n = int(input())
A = list(map(int, input().split()))

four = 0
odd = 0

for a in A:
    if a % 4 == 0:
        four += 1
    elif a % 2 == 1:
        odd += 1

if odd == 0:
    print('Yes')
else:
    if four + odd == n:
        print('Yes' if four > n // 2 else 'No')
    else:
        print('Yes' if four >= (four + odd + 1) // 2 else 'No')
# Judge status: Accepted
import sys
import numpy as np
from numba import jit
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K, *A = map(int, read().split())
 
@jit
def imos(A):
  B = np.zeros_like(A)
  for i,x in enumerate(A):
    a = max(0,i-x)
    b = min(N-1,i+x)
    B[a] += 1
    if b+1 <= N-1:
      B[b+1] -= 1
  B = np.cumsum(B)
  return B
 
for i in range(K):
  if i >= 50:
    break
  A = imos(A)
print(*A)
# Judge status: Accepted
from collections import defaultdict, Counter

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

#要素数の確認
C = Counter(A)

# 総パターンは普遍
k = 0
for i,j in C.items():
  if j == 1:
    k += 0
  else:
    k += j*(j-1)//2
# 自分の数字のパターンがへる
# delta = j(j-1)/2 - (j-1)(j-2)/2 = j - 1
d = defaultdict(int)
for i,j in C.items():
  if j == 1:
    d[i] = 0
  else:
    d[i] = j-1
    
for i in A:
  print(k-d[i])
# Judge status: Accepted
n=int(input())
p=list(map(int,input().split()))

minl=[0 for _ in range(n)]

for i in range(n):
  if i==0:
    minl[0]=p[0]
  else:
    minl[i]=min(minl[i-1],p[i])
ans=sum([p[i]==minl[i] for i in range(n)])
print(ans)
# Judge status: Accepted
s = input()
l = len(s)
if s[l-1] == "s":
    print(s + "es")
else:
    print(s + "s")
# Judge status: Accepted
A,B=map(int,input().split())
if 12>=A>=6:
  print(B//2)
elif 5>=A:
  print(0)
else:
  print(B)
# Judge status: Accepted
n=int(input())
ans=0
for i in range(1,n+1):
    if(i%3!=0 and i%5!=0):
        ans+=i


print(ans)
# Judge status: Accepted
N = int(input())
A = [0]*N
B = [0]*N 
for i in range(N):
    s,t = map(int,input().split())
    A[i] = s
    B[i] = t
A.sort()
B.sort()
if N%2 == 1:
    a = A[(N-1)//2]
    b = B[(N-1)//2]
    print(b-a+1)
if N%2 == 0:
    a = A[N//2 - 1] + A[N//2]
    b = B[N//2 - 1] + B[N//2]
    print(b-a+1)
# Judge status: Accepted
a,b=map(int,input().split())

if a+b<=23:
  print(a+b)
else:
  print(a+b-24)
# Judge status: Accepted
input_line = list(input())
t = []
for i in input_line:
	if i == "0":
		t.append("0")
	elif i == "1":
		t.append("1")
	else:
		if t == []:
			t == []
		else:
			t.pop(-1)
print("".join(t))
# Judge status: Accepted
n=int(input())
ans="No"
for i in range(1,10):
    for j in range(1,10):
        if n==i*j:
            ans="Yes"
            break
print(ans)
# Judge status: Accepted
A, B = map(int, input().split())
print(len([1 for i in range(A,B+1) if str(i)[0:]==str(i)[::-1]]))
# Judge status: Wrong Answer
n = int(input())

odd = n
if n%2==0:
    odd = n//2
elif n%2==1:
    odd = n//2 + 1
    
ans = odd / n
print(odd)
# Judge status: Wrong Answer
import math

n = int(input())

dp = [10**18] * (100000 + 10)
dp[0] = 0

for i in range(1, n+1):
    dp[i] = dp[i-1] + 1

for i in range(n-1):
    s = n-i
    for j in range(int(math.log(s, 9)+1)):
        dp[i+9**j] = min(dp[i+9**j], dp[i]+1)
    for k in range(int(math.log(s, 6)+1)):
        dp[i+6**k] = min(dp[i+6**k], dp[i]+1)


print(dp[n])
# Judge status: Accepted
# B - Tax Rate

N = int(input())

for i in range(1, 50001):
    if int(i * 1.08) == N:
        print(i)
        break
else:
    print(':(')
# Judge status: Accepted
import heapq
N = int(input())
c = input()

w = [i for i in range(N) if c[i]=='W']
r = [-i for i in range(N) if c[i]=='R']
heapq.heapify(w)
heapq.heapify(r)
ans = 0
for i in range(N):
    if w and r:
        a = heapq.heappop(w)
        b = -heapq.heappop(r)
        if a-b==1:
            break
        else:
            heapq.heappush(w,b)
            heapq.heappush(r,-a)
            ans += 1
print(ans)
# Judge status: Wrong Answer
from collections import Counter

N,K = map(int,input().split())
A = list(map(int,input().split()))
cnt = len(set(A)) - K
d = Counter(A)
l = sorted(d.keys(),reverse=True)
res = 0
for i in range(cnt):
    res += d[l[i]]
print(res)
# Judge status: Accepted
import math as m


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

if x == b * a**2:
    print(0)

elif x >= b * a**2 / 2:
    y = 2 * (b - x / (a**2))
    print(90 - m.atan(a / y) * 180 / m.pi)
else:
    y = 2 * x / (a * b)
    print(90 - m.atan(y / b) * 180 / m.pi)
# Judge status: Accepted
n = (int)(input())
alp = [10000 for i in range(0 , 90)] # initialize to infinity
for i in range(0 , n):
	s = input()
	now = [0 for i in range(29)]
	for i in s:
		now[ord(i)-ord('a')]+=1 # counting letters
	for i in range(0  ,27):
		alp[i]=min(alp[i], now[i])# consider minimum frequency of every letter occuring in the string
res = ""
for i in range(0 , 26):
	if alp[i]>=1:
		res = res+"".join(([(chr(i+ord('a')))]*alp[i])) # very complex
print(res)
# Judge status: Accepted
from operator import itemgetter

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

for i in range(n):
    x = XLs[i][0]
    l = XLs[i][1]
    XLs[i].append(x+l)

#右手の端の位置でソート
XLs.sort(key=itemgetter(2))

choice = -10**10
cnt = 0
for i in range(n):
    x = XLs[i][0]
    l = XLs[i][1]

    if choice <= x-l:
        choice = x+l
        cnt += 1

print(cnt)
# Judge status: Wrong Answer
s = input()
if s is "ABC": print("ARC")
else: print("ABC")
# Judge status: Accepted
k,r = map(int,input().split())
if k>=10:
  print(r)
else:
  print(r+100*(10-k))
# Judge status: Accepted
sl = list(input())
k = int(input())

for i in range(len(sl)):
    ord_s = ord(sl[i])
    use = 123 - ord_s
    if k - use >= 0 and sl[i] != "a":
        sl[i] = "a"
        k -= use

if k > 0:
    sl[-1] = chr((ord(sl[-1]) + k - 97) % 26 + 97)

print("".join(sl))
# Judge status: Accepted
import sys
from collections import Counter
input = sys.stdin.readline
N = int(input())
A = [int(input()) for _ in range(N)]
c = Counter(A)
print(sum(map(lambda x: x % 2, c.values())))
# Judge status: Wrong Answer
if __name__ == '__main__':

    n = int(input())

    A = [2,1]
    if n == 1:
        print(A[1])
    else:
        for i in range(2,n+1):
            A.append(A[i-2] + A[i-1])
    print(A[n])
# Judge status: Accepted
n=int(input())
if n<10:
  print(n)
if 10<=n<100:
  print(9)
elif 100 <= n < 1000:
  print(n-90)
elif 1000 <= n < 10000:
  print(909)
elif 10000 <= n < 100000:
  print(n-9090)
elif n==100000:
  print(90909)
# Judge status: Accepted
n = input()
N = int(n)
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

i=0
man=0
oldA=1
for A in a:
  #print(A)
  B = b[int(A)-1]
  #print(B)
  man = man + int(B)
  if i>0:
    if oldA+1==A:
      C = int(c[oldA-1])
      man = man + C
      #print(C)
  i=i+1
  oldA=A
print(man)
# Judge status: Accepted
N = 10**6
mod = 10**9 + 7
fact = [1]
for i in range(1, N+1):
     fact.append(fact[-1]*i%mod)

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

if n-m  > 1 or m-n >1:
     ans=0
elif n-m == 0:
     ans = 2*fact[n]*fact[m]%mod
else:
     ans = fact[n] * fact[m] % mod
print(ans)
# Judge status: Accepted
s = [int(c) for c in list(input())]
num = 753
ans = num
for i in range(len(s) - 2):
    x = s[i] * 10 ** 2 + s[i + 1] * 10 + s[i + 2]
    ans = min(ans, abs(num - x))
print(ans)
# Judge status: Accepted
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

k=n_in()
s=s_in()

if len(s) <= k:
    print(s)
else:
    print(s[:k]+"...")
# Judge status: Accepted
from math import ceil

N, *ABCDE = map(int, open(0).read().split())
bottle_neck = min(ABCDE)
print(ceil(N / bottle_neck) + 4)
# Judge status: Accepted
N, X = map(int,input().split())
ls = list(map(int,input().split()))

ls_x = [abs(l - X) for l in ls]

import fractions

ans = ls_x[0]
for i in range(1, N):
    ans = fractions.gcd(ans, ls_x[i])
print(ans)
# Judge status: Accepted
def check(a, b):
    for i in range(len(a)):
        if not(a[i] == b[i] or a[i] == '?'):
            return False
    return True


s_prime = input()
t = input()
ans_list = []
for i in range(len(s_prime) - len(t) + 1):
    if check(s_prime[i:i+len(t)], t):
        s = s_prime[:i] + t + s_prime[i+len(t):]
        ans = s.replace('?', 'a')
        ans_list.append(ans)
ans_list.sort()
if not ans_list:
    print('UNRESTORABLE')
else:
    print(ans_list[0])
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
B = set()
cnt = 0
for i in range(N-1):
  for j in range(N-1):
    if A[j] % A[i] == 0 and i != j:
      B.add(A[j])
for i in range(N-1):
  if A[j] == A[i] and i != j:
    cnt += 1
    
print(N-cnt-len(B)-1)
# Judge status: Accepted
import sys
#sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from random import randint
d=int(input().rstrip())
c=[int(i)for i in input().split()]
s=[[int(i)for i in input().split()]for _ in range(d)]
last=[0]*26
for i in range(d):
    print((i+4)%26+1)
# Judge status: Wrong Answer
A, B, C, K = map(int, input().split())
if K == 0:
    print(A - B)
elif K == 1:
    print(B - A)
else:
    print(0)
# Judge status: Wrong Answer
from math import *
a,b,c,d = map(int,input().split())
f =(c*d)//gcd(c,d)
r = f
rock = 2
compteur= b//f
div1 = ((b//c)-(a//c))
div2 = ((b//d)-(a//d))
if  a%c == 0:
  div1+=1
if a%d ==0:
  div2 +=1
roger =(div1+div2)-compteur
mm = (b-a)+1
print(mm-roger)
# Judge status: Accepted
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort()
q.sort()
r.sort(reverse=True)
del p[:a-x]
del q[:b-y]

s=p+q
s.sort()
if s[0]<r[0]:
    s[0]=r[0]
    for i in range(1,c):
        if s[i]>=r[i]:
            break
        else:
            s[i]=r[i]

print(sum(s))
# Judge status: Accepted
A, B =map(int, input().split())
print((A+B)%24)
# Judge status: Wrong Answer
a, b, c = map(int,input().split())
R, L = 10**9, 0
mod = 10**9+7
while L < R:
    if (a*b)%mod < (((R+L)//2)**2)%mod:
        R = (R+L)//2 - 1
    else:
        L = (R+L)//2
if a==b:
    if 4*a < c:
        print("Yes")
    else:
        print("No")
else:
    if a+b+2*R+1<= c:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
import numpy as np
# 締切が早いものから処理
N = int(input())
AB = np.array([[int(x) for x in input().split()] for _ in range(N)])
A = AB[:,0]
B = AB[:,1]
idx = B.argsort()
A = A[idx]
B = B[idx]
np.cumsum(A, out = A)
bl = (A <= B).all()
answer = 'Yes' if bl else 'No'
print(answer)
# Judge status: Wrong Answer
import sys
a,b = map(int,input().split())
s = list(input())
print(s)
if s[a] != "-":
	print("No")
	sys.exit()
s[s.index("-")] = "1"
for i in range(len(s)):
	if s[i].isdigit():
		if int(s[i]) >= 6 or int(s[i]) <= 0:
			print("No")
			sys.exit()
	else:
		print("No")
		sys.exit()
print("Yes")
# Judge status: Accepted
n, k = map(int, input().split())
ps = list(map(int, input().split()))

ps = sorted(ps)

print(sum(ps[:k]))
# Judge status: Wrong Answer
import math as mt
a, b, c = map(int, input().split())
if a**2 + b**2 + 2*mt.sqrt(a*b) < c**2:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
x = int(input())
ans = 1
for i in range(1,x//2):
  for j in range(2,10):
    if i ** j <= x:
      ans = i**j
print(ans)
# Judge status: Accepted
x = int(input())

ans = 2 * (x // 11)

if x % 11 == 0:
  pass
elif x % 11 < 7:
  ans += 1
else:
  ans += 2
print(ans)
# Judge status: Accepted
s = input()
k = 'keyence'
res = 'NO'
if s[:len(k)]==k or s[len(s)-len(k):]==k:
    res = 'YES'
else:
    for i in range(len(k)+1):
        if s[:i]+s[len(s)-len(k)+i:] == k:
            res = 'YES'
            break
print(res)
# Judge status: Accepted
a, b = map(int, input().split())
menor_t, menor_c = 1000, 1000
index = 0
for i in range(a):
    c, t = map(int, input().split())
    if t <= b:
        if c < menor_c:
            menor_c = c
        index = i + 1
if index == 0:
    print('TLE')
else:
    print(menor_c)
# Judge status: Accepted
# ASCII A-Z 65-90
N = int(input())
S = list(input())
out = ''
for i in S:
    if ord(i) + N > 90:
        out += chr(ord(i) + N - 26)
    else:
        out += chr(ord(i) + N)
print(out)
# Judge status: Accepted
from bisect import bisect_left, bisect_right
n=int(input())
a=sorted(map(int,input().split()))
b=sorted(map(int,input().split()))
c=sorted(map(int,input().split()))

ans=0
for i in range(n):
    s=b[i]
    upper=bisect_left(a,s)
    lower=n-bisect_right(c,s)
    ans+=(upper*lower)

print(ans)
# Judge status: Wrong Answer
stdin = [input() for i in range(2)]
line = stdin[0].split(' ')
N = int(line[0])
K = int(line[1])
line = stdin[1].split(' ')
Ai = [0]*N
for i in range(len(line)):
    Ai[i] = int(line[i])

for i in range(K):
    Bi = [1]*N
    for i, d in enumerate(Ai):
        for j in range(1,d+1):
            if i-j >=0:
                Bi[i-j] +=1
            if i+j <N:
                Bi[i+j] +=1
    Ai = Bi

print(Ai)
# Judge status: Accepted
alpha = input()


if alpha.isupper():
    print('A')
    
if alpha.islower():
    print('a')
# Judge status: Accepted
g1 = [1, 3, 5, 7, 8, 10, 12]
g2 = [4, 6, 9, 11]
g3 = [2]
result = 'No'
x, y = map(int, input().split())

if x in g1:
    if y in g1:
        result = 'Yes'
elif x in g2:
    if y in g2:
        result ='Yes'
print(result)
# Judge status: Accepted
n,w=map(int,input().split())
goods=[list(map(int,input().split())) for _ in range(n)]
DP=[[0]*(w+1) for _ in range(n+1)]
for i in list(range(n))[::-1]:
  wi,vi=goods[i][0],goods[i][1]
  for j in range(w+1):
    if j<wi:
      DP[i][j]=DP[i+1][j]
    else:
      DP[i][j]=max(DP[i+1][j],DP[i+1][j-wi]+vi)
print(DP[0][w])
# Judge status: Wrong Answer
n = int(input())
p = 0
result = []
while True:
    p = n % 26
    n //= 26
    result.append(p)
    if n == 0:
        break

string = 'abcdefghijklmnopqrstuvwxyz'
ans = []
for i in range(len(result)-1,-1, -1):
    index = result[i]-1 
    ans.append(string[index:index+1])
print (''.join(map(str, ans)))
# Judge status: Wrong Answer
N, K, S = map(int,input().split())
A = []

if K == N:
    A.extend([S] * N)
else:
    if S == 1:
        A.extend([1] * K)
        A.extend([2] * (N - K))
    else:
        for i in range((K + 1) // 2):
            A.extend([1, S - 1])
        if N % 2 == 0:
            A.append(1)
        x = S + 1 if S != 10 ** 9 else S - 2
        A.extend([x] * (N - K - 1))

for Ai in A:
    print(Ai, end = " ")
# Judge status: Accepted
X = int(input())

if X == 2:
    print(2)
    exit()

prime = [2]
k = 3
while True:
    isPrime = True
    maxK = int(k ** 0.5) + 1
    for p in prime:
        if p >= maxK:
            break
        isPrime &= (k % p != 0)
    if isPrime:
        prime.append(k)
        if k >= X:
            break
    k += 2
print(prime[-1])
# Judge status: Accepted
N=int(input())
A=int(input())
amari=N%500
if A>=amari:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
s = input()

a_cnt = 0
b_cnt = 0
c_cnt = 0
for i in range(len(s)):
    if s[i] == 'a':
        a_cnt += 1
    elif s[i] == 'b':
        b_cnt += 1
    else:
        c_cnt += 1
        
abc_max = max(a_cnt, b_cnt, c_cnt)
abc_min = min(a_cnt, b_cnt, c_cnt)

if abc_max < abc_min + 2:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
import math
a, b, x = map(int, input().split())

if x/a >= (a*b)/2:
    ans = math.degrees(math.atan((2/a)*(b-(x/a**2))))
else:
    ans = math.degrees(math.atan((a*b*b)/(2*x)))
print('{:.10f}'.format(ans))
# Judge status: Accepted
H, W = map(int, input().split())

if min(H,W) == 1:
    print(1)
else:
    print(-(-H*W//2))
# Judge status: Wrong Answer
N,M=list(map(int,input().split()))
l=[list(input()) for i in range(N)]
mini=[list(input()) for i in range(M)]
mini="".join(sum(mini,[]))
for i in range(N-M+1):
   for j in range(N-M+1):
      let=""
      for k in range(i,M+i):
         let+="".join(l[k][j:j+M])
   if mini == let:
      print("Yes")
      exit()
print("No")
# Judge status: Accepted
n,a,b=map(int,input().split())
ac=0
bc=0
for i in input():
  if i=='a':
    if ac+bc<a+b:
      print('Yes')
      ac+=1
      continue
  elif i=='b':
    if ac+bc<a+b and bc<b:
      print('Yes')
      bc+=1
      continue
  print('No')