peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
X,Y=map(int,input().split())

a=(2*Y-X)//3
b=(2*X-Y)//3

N=a+b

ans=0

#print(a,b,N)


if (X+Y)%3!=0:
    ans=0
elif a==0 or b==0:
    ans=1
else:
    NN=1
    aa=1
    for i in range(1,a+1):
        NN*=N+1-i
        aa*=i
    ans=N//a

print(ans%(10**9+7))
# Judge status: Accepted
n = int(input())
w = list(map(int, input().split()))

kei = sum(w)

absvalue = []

for t in range(1, n):
    subsum = sum(w[i] for i in range(t))
    nokori = kei - subsum
    absvalue.append(abs(subsum-nokori))

print(min(absvalue))
# Judge status: Accepted
x, a, b = map(int, input().split())

if a - b >= 0:
    print("delicious ")
elif b - a <= x:
    print("safe")
else:
    print("dangerous ")
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a!=b!=c:
  print(3)
elif a==b!=c or a!=b==c or c==a!=b:
  print(2)
else:
  print(1)
# Judge status: Accepted
#!/usr/bin/env python
n = int(input())
a = list(map(int, input().split()))

money = 1000
kabu = 0 

for i in range(n-1):
    s = a[i]
    t = a[i+1]
    if s < t:
        k = money//s
        money %= s
        money += k*t 

print(money)
# Judge status: Wrong Answer
def xxx(n):
    alpha = "abcdefghijklmnopqrstuvwxyz"
    ans = ""
    i = 1

    while True:
        if n <= 26 ** i:
            n -= 1
            while n > 0:
                ans = alpha[n%26] + ans
                n //= 26
            return ans
        else:
            n -= 26 ** i
            i += 1


N = int(input())
print(xxx(N))
# Judge status: Accepted
S=input()
T=input()
print('YES' if S==T[::-1] else 'NO')
# Judge status: Accepted
N=int(input())
print((N/3)**3)
# Judge status: Wrong Answer
from fractions import gcd
import itertools
N = int(input())
l = []

for z in range (1, N + 1):
  for y in range(N + 1):
    l += [z]
p_set = set(itertools.combinations(l, 3))
print(len(p_set))
s = 0
for i,j,k in p_set:
  t = gcd(i,j)
  t2 = gcd(t,k)
  if i == j and j == k:
    factor = 1
  elif i != j and i!= k and j != k:
    factor = 6
  else:
    factor = 3
  s += t2 * factor
print(s)
# Judge status: Accepted
s=input()
n=len(s)
if n==4:
    x=s[2]
else:
    x=s[2:n-1]
    
if s[0]!='A':
    print('WA')
    
elif x.count('C')!=1:
    print('WA')
    
else:
    i=x.find('C')
    s=list(s)
    s.pop(i+2)
    s.pop(0)
    s=''.join(s)
    if s.islower()==True:
        print('AC')
    else:
        print('WA')
# Judge status: Accepted
n,l = map(int, input().split())
s = []
for i in range(n):
    s.append(input())

s.sort()
ans = s[0]
for i in range(1,n):
    ans += s[i]

print(ans)
# Judge status: Wrong Answer
S = input()
T = input()

success = 0

for i in range(len(S)):
    if S[i:] + S[:i]:
        success += 1

if success >= 1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N, K = map(int, input().split())
d = list()
have = list()

for i in range(K):
    d.append(int(input()))
    holders = list(map(int, input().split()))
    for holder in holders:
        if holder not in have:
            have.append(holder)
print(N - len(have))
# Judge status: Accepted
a,b = map(int, input().split())
print(sum([i for i in range(b-a)]) - a)
# Judge status: Accepted
a=[int(input()) for _ in range(5)];k=int(input());print(':(' if max(a)-min(a)>k else 'Yay!')
# Judge status: Wrong Answer
def main():
    S = input()
    mind = 1000
    for i in range(len(S) - 3 + 1):
        d = abs(753 - int(S[i:i+3]))
        if d < mind:
            mind = d
    print(d)
main()
# Judge status: Wrong Answer
n,a,b = map(int,input().split())
S = n//(a+b)
N = n%(a+b)
if a+b > n:
    print(a)
if (a+b <= n) and N <= a:
    print(S*a+N)
if (a+b <= n) and N > a:
    print(S*a)
# Judge status: Wrong Answer
n = int(input())
arr= []
for i in range(n):
  z = [ int(i) for i in input().split()]
  arr.append(z)
  
count = 0 
for i in range(n):
  
    if arr[i][0] == arr[i][1]:
      count+=1
cu = 0
for i in range(n):
  for j in range(n):
    if i == j:
      continue 
    if arr[i][0]==arr[j][0]:
      cu +=1
    if arr[i][1] == arr[j][1]:
      cu +=1
    if cu>=1:
      break
      
if count>=3 and cu>=1:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
n = int(input())
A = list(map(int, input().split()))
money = 1000
cnt = 0
x = ""
b = ""
for a in A:
    if b == "": b = a
    else:
        if b == a: continue
        else: b = a

    if x == "":
        cnt = money//a
        money -= cnt * a
        x = a
    else:
        if a > x:
            money += cnt * a
            cnt = 0
            x = ""
if cnt > 0: money += cnt * x
print(money)
# Judge status: Accepted

a,b = input().split()
ab = int(a+b)

print("Yes" if ab%(ab**0.5)==0 else "No")
# Judge status: Wrong Answer
n,x = list(map(int,input().split()))
a = list(map(int,input().split()))
op=0
for i in range(len(a)-1):
    s = a[i]+a[i+1]
    if (s < x):
        continue
    else:
        diff = s - x
        op += diff
        if a[i] > a[i+1]:
            a[i] -= diff
        else:
            a[i+1] -= diff
print(op)
# Judge status: Accepted
s=input()

if(s[2]==s[3] and s[4]==s[5]):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
icase=0    
if icase==0:
    a,b=map(int,input().split())
    if (a+b)%3==0:    
        print("Possible")
    else:    
        print("Impossible")
# Judge status: Accepted
n = int(input())
c = 0
l = list(map(int, input().split()))
for i in range(1,n-1,1):
    m = max(l[i-1],l[i+1],l[i]); n = min(l[i-1],l[i],l[i+1])
    if l[i]!= m and l[i]!= n:
        c += 1
print(c)
# Judge status: Accepted
a, b, x = map(int, input().split())

if a <= x <= a + b:
	print("YES")
else:
	print("NO")
# Judge status: Accepted
n, k, *h = map(int, open(0).read().split())
h.sort()
print(min(h[i+k-1]-h[i] for i in range(n-k+1)))
# Judge status: Wrong Answer
n = int(input())
pair = []
ns = []

prev = 0
for i in range(n-1):
    c,s,f = map(int, input().split())
    pair.append((c,s,f))
    # print(s+c)
    n = max(prev-s,0)//f
    ns.append((f,n))
    prev = s+c+n*f
# print(ns)
for f,n in ns:
    print(prev-n*f)
print(0)
# Judge status: Accepted
N = int(input())
T, A = map(int, input().split())
H = [int(i) for i in input().split()]
temp = []

for i in H:
    temp.append(abs(A - (T - i * 0.006)))
min_ind = temp.index(min(temp))
print(min_ind+1)
# Judge status: Wrong Answer
import numpy as np
mod = 10**9+7
n = int(input())
a = np.array(list(map(int,input().split())))

result = 0
for i in range(62):
    count_one = sum(a%2)
    result += count_one*(n-count_one)*(2**i)%mod
    a = a >> 1
print(result%mod)
# Judge status: Wrong Answer
def soma(a):
    res=0
    if(int(a)<10):
        return int(a)
        
    for i in range(0, len(a)-1):
        res+=int(a[i])

    if(res>=10):
        return soma(str(res))

    return res

def main():
    n = int(input())
    menor = soma(str(n-1))+1
    
    for i in range(1,10):
        if(soma(str(i))+soma(str(n-i))<menor):
            menor = soma(str(i))+soma(str(n-i))

    print(menor,"\n")

main()
# Judge status: Accepted
x,y=map(int,input().split())
a=x
i=0
while x<=y:
    x*=2
    i+=1
print(i)
# Judge status: Accepted
S = input()

if "7" in S:
    print('Yes')

else:
    print('No')
# Judge status: Accepted
import math

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

print(math.ceil((n-1)/(k-1)))
# Judge status: Accepted
def cin():  return list(map(int,input().split()))
K, A, B = cin()
ans1 = K + 1
kk = K - (A - 1)
ans2 = 0
if kk > 0:
    if kk % 2:  ans2 = A + 1 + kk // 2 * (B - A)
    else:  ans2 = A + kk // 2 * (B - A)
ans = max(ans1, ans2)
print(ans)
# Judge status: Accepted
s = list(input())
ans = 'Yes'
if s.count('A') == 3 or s.count('B') == 3:
    ans = 'No'
print(ans)
# Judge status: Wrong Answer
N = int(input())
S = input()
L = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
A = ''
for i in S:
  N = L.index(i)
  if N == 25:
    N = 0
  else:
    N += 1
  A += L[N]
print(A)
# Judge status: Accepted
N = int(input())
a = list(map(int,input().split()))
a.sort(reverse = True)
print(sum(a[1:2*N:2]))
# Judge status: Accepted
K = int(input())

if K % 2 == 0 or K % 5 == 0:
    print(-1)
    exit()

i = 0
sevens = 0
while True:
    sevens += 7 * pow(10, i, K)
    sevens %= K
    i += 1
    if sevens == 0:
        break
print(i)
# Judge status: Wrong Answer
n,m=map(int,input().split())
a=[list(input()) for _ in range(n)]
b=[list(input()) for _ in range(m)]
r=n-m+1
for x in range(r**2):
  for y in range(m**2):
    if a[x//r][x%r]!=b[y//m][y%m]:
      break
  else:
    print('Yes')
    break
else:
  print('No')
# Judge status: Accepted
a,b,c=map(int,input().split())
x = b*10+c
if not x%4:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
N=list(map(int,input().split()))
a=N[0]
b=N[1]
if a>b:
  B=str(b)
  print(B*a)
else:
  A=str(a)
  print(A*b)
# Judge status: Wrong Answer
n = int(input())
x=0
s=input()
ans=0
for i in range(n):
    if s[i]=="I":
        x=x+1
    else:
        x=x-1
    ans=max(ans,x)
print(x)
# Judge status: Wrong Answer
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    x, n = map(int, input().split())
    p = list(map(int, input().split()))
    ans = x
    absol = 1000

    for i in range(1, 101):
        if i not in p:
            if abs(i - x) < absol:
                absol = abs(i - x)
                ans = i
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
a = list(map(int, input().split()))
b = list(set(a))
print(len(b))
# Judge status: Accepted
s = input()
t = input()
sl = len(s)
tl = len(t)

if sl < tl:
  print("UNRESTORABLE")
  exit()
  
possible = []
for i in range(sl - tl + 1):
  temp = s[i:i+tl]
  flag = True
  for a, b in zip(t, temp):
    if b != "?" and a != b:
      flag = False
  if flag:
    w = s[:i] + t + s[i+tl:]
    possible.append(w.replace("?", "a"))
if len(possible) == 0:
  print("UNRESTORABLE")
  exit()
print(sorted(possible)[0])
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
# step 1 後ろからの累積
cum = [0] * (n + 1)
cum[n] = a[n]
for i in range(n):
    cum[n - 1 - i] = cum[n - i] + a[n - 1 - i]
# print(cum)

dp = [0] * (n + 1)
dp[0] = 1
ans = dp[0]
ng = 0
for i in range(n):
    dp[i + 1] = min(2 * (dp[i] - a[i]), cum[i + 1])
    if dp[i + 1] <= 0:
        ng = 1
    ans += dp[i + 1]
if ng:
    print(-1)
else:
    print(ans)
# Judge status: Wrong Answer
from sys import exit
N = int(input())
A = list(map(int,input().split()))
ans = 1
for i in A:
    ans *= i
    if ans > 10 ** 18:
        print(-1)
        exit()
print(ans)
# Judge status: Accepted
import sys
import math

sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

s = a * b

theta = 0
if a * a * b / 2 < x:
    theta = math.atan(2 * (a**2 * b - x) / a**3)
else:
    theta = math.atan((a * b**2) / (2 * x))

deg = math.degrees(theta)

print('{:.10f}'.format(deg))
# Judge status: Accepted
s= input()
t=input()

if t[:-1]==s:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
N = int(input())
for i in range(N):
  if 2**i <= N:
    pass
  else:
    print(2**(i-1))
    break
# Judge status: Accepted
X = int(input())

if 400 <= X <= 599:
    print("8")
elif 600 <= X <= 799:
    print("7")
elif 800 <= X <= 999:
    print("6")
elif 1000 <= X <= 1199:
    print("5")
elif 1200 <= X <= 1399:
    print("4")
elif 1400 <= X <= 1599:
    print("3")
elif 1600 <= X <= 1799:
    print("2")
elif 1800 <= X <= 1999:
    print("1")
# Judge status: Accepted
import math
k=int(input())
sum=0
    
for i in range(1,k+1):
  for j in range(1,k+1):
    for z in range(1,k+1):
      sum+=math.gcd(i,math.gcd(j,z))
      
print(sum)
# Judge status: Accepted
import bisect
n = int(input())
li = list(map(int, input().split()))

li.sort()
ans = 0

for i in range(n-2):
    for j in range(i+1,n-1):
        ans += bisect.bisect_left(li, li[i]+li[j]) - j - 1

print(ans)
# Judge status: Accepted
K, X = map(int, input().split())
print(*[i for i in range(max(-1000000, X-K+1), min(1000000, X+K-1) + 1)])
# Judge status: Accepted
def cin():
	return map(int,input().split())

def cino(test=False):
    if not test:
        return int(input())
    else:
        return input()
def cina():
  return list(map(int,input().split()))

def ssplit():
    return list(input().split())


import math
a,b,c = cin()
print(b//c - a//c+(a%c==0))
# Judge status: Accepted
def main():
    a, b = map(int, input().split())

    res = 0

    for i in range(a, b + 1):
        if str(i) == str(i)[::-1]:
            res += 1
    
    print(res)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
#入力
lst = input().split()

#整数値化
for i in range(len(lst)):
   lst[i] = int(lst[i])

#ソート
lst.sort()

#出力
if lst[0] == lst[2]:
   print(3)
elif lst[0] == lst[1] or lst[1] == lst[2]:
   print(2)
else:
   print(1)
# Judge status: Accepted
N = int(input())
xys = [tuple(map(int, input().split())) for _ in range(N)]

xpys = [x + y for x, y in xys]
dist1 = max(xpys) - min(xpys)
xmys = [x - y for x, y in xys]
dist2 = max(xmys) - min(xmys)
print(max(dist1, dist2))
# Judge status: Accepted
N=int(input())
W=list(map(int, input().split()))
t1=0
t2=0
for i in range(N):
    t2+=W[i]
ans=t2
for i in range(N):
    t1+=W[i]
    t2-=W[i]
    ans=min(ans, abs(t1-t2))
print(ans)
# Judge status: Accepted
k = int(input())
a, b = map(int, input().split())
ng_flag = True
for i in range(a, b+1):
    if i % k == 0:
        print('OK')
        ng_flag = False
        break

if ng_flag:
    print('NG')
# Judge status: Accepted
X, K, D = map(int, input().split())

X = abs(X)
ans = 0
if X - K*D >= 0:
  ans = X - K*D
else:
  count = X // D
  K = K - (X // D)
  if K % 2 == 0: 
    ans = X - count*D
  else: 
    ans = D - (X - count*D)
    
print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline
x,y,z=map(int,input().split())
print((x-z)//(y+z))
# Judge status: Accepted
s = input()
for i in range(26):
  if chr(ord('a') + i) not in s:
    print(chr(ord('a') + i))
    exit()
print('None')
# Judge status: Accepted
import math

a, b = list(map(int, input().split()))
n = b * 10
flag = False
while n <= 1009:
    if math.floor(n * 0.1) == b and math.floor(n * 0.08) == a:
        flag = True
        break
    n += 1
print(n) if flag is True else print(-1)
# Judge status: Accepted
# coding: utf-8
import itertools

def main():
    n = int(input())
    if n < 3:
        return 0
    l_array = list(map(int, input().split()))
    ans = 0
    for (a, b, c) in itertools.combinations(l_array, 3):
        if a == b or b == c or c == a:
            continue
        elif a + b <= c or b + c <= a or c + a <= b:
            continue
        else:
            ans += 1
    return ans
        
print(main())
# Judge status: Wrong Answer
# 数値の取得
a = int(input())
b = int(input())
h = int(input())
 
# 面積を求めて出力
area = (a + b) * h * 0.5
print(area)
# Judge status: Accepted
a, b = map(int, input().split())
hole = 1
i = 0
check = True

while check:
    if hole >= b:
        check = False
    else:
        hole = a*(i + 1) - i
        i += 1

print(i)
# Judge status: Wrong Answer
A,B=map(float,input().split())
C=B*1000
print(A*C//1000)
# Judge status: Accepted
x, y = map(int, input().split())

tori = 2
kame = 4 # 全部
legs = 4*x
while True:
    if legs == y:
        print("Yes")
        exit()
    legs -= 2
    if legs < 2*x: # 全部鳥
        print("No")
        exit()
# Judge status: Accepted
#import sys
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

a=[0]
b=[0]
for i in range(N):
    a.append(a[i]+A[i])
for j in range(M):
    b.append(b[j]+B[j])
ans = 0
l = M
for k in range(N+1):
    if a[k] > K:
        break
    while b[l] > K - a[k]:
        l -= 1
    ans = max(ans,k+l)
print(ans)
# Judge status: Wrong Answer
ans =0
n = int(input()) 
while n%2 ==0 :
    ans+= 1 
    n//=2

print(ans)
# Judge status: Accepted
S=str(input())
S=S.replace('?', 'D')
print(S)
# Judge status: Accepted
print('No' if len(set(input()))==1 else 'Yes')
# Judge status: Accepted
n = int(input())
if n >= 30:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
N = int(input())
ans = 800*N-200*(N//15)
print(ans)
# Judge status: Accepted
X, Y = map(int, input().split())

m, r = divmod(2*Y-X, 3)
if r != 0:
    print(0)
    exit()

n = Y - 2*m

if n < 0 or m < 0:
    print(0)
    exit()

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n-i) * modinv(i+1, mod) % mod
    return res

print(combination(n+m, n))
# Judge status: Wrong Answer
N = int(input())

if N <= 10**9:
  List = [0,0,0,1,N,0]
else:
  a = int(N % 10**9)
  b = int(N // 10**9)
  List = [0,0,10**9,b,a,1]
  
print(*List)
# Judge status: Accepted
#!/usr/bin/env python3
n = int(input())
e = sorted([[str(i + 1)] + input().split() for i in range(n)],
           key=lambda x: int(x[2]),
           reverse=True)
d = dict()
for i in e:
    if i[1] not in d:
        d[i[1]] = []
    d[i[1]].append(i[0])
e = sorted(d.items(), key=lambda x: x[0])
for i in e:
    print(*i[1], sep="\n")
# Judge status: Wrong Answer
import sys
from heapq import heapify, heappop
read=sys.stdin.read

n,*a=map(int,read().split())
a.append(max(a)+1)
heapify(a)
x=heappop(a)
f=1
ans=0
while a:
  y=heappop(a)
  if x==y:
    f^=1
  else:
    ans+=1-f
    f=1
    x=y
print(ans)
# Judge status: Accepted
a = int(input())
b = int(input())
c = int(input())
x = int(input())

ans = 0
for i in range(min((x//500), a) +1):
  for j in range(min((x-500*i)//100, b) +1):
    tmp = x - (500 * i)  - (100 * j)
    if tmp % 50 == 0 and tmp // 50 <= c:
      ans += 1
    
print(ans)
# Judge status: Accepted
N = int(input())
As = list(map(lambda x: int(x)//400, input().split()))

As_other = [a for a in As if a<8]
reds = len(As)-len(As_other)

print(max(len(set(As_other)), 1), len(set(As_other))+reds)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
ans=1;before=a[0];mode=0
for i,v in enumerate(a):
    nmode=0
    if before>v:
        nmode=-1
    elif before<v:
        nmode=1
    before=v
    if mode*nmode==-1:
        mode=0
        ans+=1
    elif mode==0:
        mode=nmode
print(ans)
# Judge status: Wrong Answer
N=int(input())
a=input().split()
numbers=[int(b) for b in a]
kazu=0
suuji=0
for z in numbers:
    if z%2==0:
        kazu+=1
for y in numbers:
    if y%4==0:
        suuji+=1
if kazu==N:
    print('Yes')
elif suuji==N//2:
    print('Yes')
elif kazu>=N-kazu*3+1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
from collections import deque

def main():
    T = input()
    d = deque(T)
    ans = deque()
    nxt = ""
    cnt = 0

    while d:
        now = d.pop()
        if now == "?":
            now = "D"
        ans.appendleft(now)

    print("".join(ans))
    

if __name__ == "__main__":
    main()
# Judge status: Accepted
a=input()
a=int(a)
if a==25:
  print("Christmas")
if a==24:
  print("Christmas Eve")
if a==23:
  print("Christmas Eve Eve")
if a==22:
  print("Christmas Eve Eve Eve")
# Judge status: Accepted
from collections import deque
s = input()
q = int(input())
r = False
S = deque(s)
for _ in range(q):
  d = list(input().split())
  if len(d)==1:
    r = ~r
  else:
    if (d[1]=='1' and ~r) or (d[1]=='2' and r):
      S.appendleft(d[2])
    else:
      S.append(d[2])
s = ''.join(S)
if r:
  s = s[::-1]
print(s)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if c>=a and c<=b:print('YES')
else:print('NO')
# Judge status: Accepted
li = list(map(int, input().rstrip().split()))
five = 0
seven = 0
for x in li:
    if x == 5:
        five += 1
    elif x == 7:
        seven += 1
if five == 2 and seven == 1:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n = int(input())
ans = 1
for i in range(100000):
    if i * i <= n:
        ans = i * i
    else: break
print(ans)
# Judge status: Wrong Answer
N,M = map(int,input().split())
H = list(map(int,input().split()))
H = [0] + H
Tree = [0] + [1]*N
for _ in range(M):
  A,B = map(int,input().split())
  if H[A] >= H[B]:
    Tree[B] = 0
  else:
    Tree[A] = 0
print(sum(H))
# Judge status: Wrong Answer
# coding: utf-8
N,M=map(int,input().split())
L=[[] for i in range(N)]
#print(L)


for i in range(M):
    p,y=map(int,input().split())
    L[p-1].append(y)

#print(L)

for i in range(N):
    L[i].sort()
    
#print(L)

for i in range(N):
    if L[i]!=[]:
        for j in range(len(L[i])):
            ans=str(i+1).zfill(6)+str(j+1).zfill(6)
            print(ans)
# Judge status: Accepted
A,B,C=list(input()),list(input()),list(input())
Q=[A,B,C]
i=["a","b","c"]
k=A[0]
while(True):
  j=i.index(k)
  if len(Q[j])==0:
    print(k.upper())
    exit()
  k=Q[j][0]
  Q[j]=Q[j][1:]
# Judge status: Accepted
S = input()
a = []
for _ in range(len(S)):
    a.append('x')
print(''.join(a))
# Judge status: Accepted
n, k = map(int, input().split())
s = input()
for c in range(n):
  if c == k-1:
    print(s[c].lower(), end="")
  else:
    print(s[c], end="")
# Judge status: Accepted
X = int(input())
money = 100
ans = 1
while True:
    money += money // 100
    if money >= X:
        break
    ans += 1
print(ans)
# Judge status: Wrong Answer
n, k = map(int, input().split())
al = list(map(int, input().split()))

if n <= k:
    print(1)
elif n <= (k-1)*2:
    print(2)
else:
    cnt = 2
    m = n - (k-1)*2
    while m >= 0:
        m -= k + 1
        cnt += 1
    one = al.index(1)
    if one == k+1 or (n-one) == k+1:
        print(cnt + 1)
    else:
        print(cnt)
# Judge status: Accepted
contest_num = int(input())

if contest_num >= 1999: # 不等号は=の手前に
    result_str = 'The contest has not been held'

elif contest_num < 1000:
    result_str = 'ABC'

elif contest_num >= 1000:
    result_str = 'ABD'

print(result_str)
# Judge status: Wrong Answer
def gcd(x, y):
        if y == 0: return x
        return gcd(y, x%y)

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

A.sort()

ans = 0
if A[0] == max(A):
    ans = A[0]
else:
    a = A[0]
    b = 0
    for i in range(1, N):
        if a != A[i]:
            b = A[i]
            break
        
    ans = gcd(a, b)


print(ans)
# Judge status: Wrong Answer
n, l = map(int, input().split())
taste = [l+i-1 for i in range(n)]
eaten = 9999
for t in taste:
  if abs(t) < eaten:
    eaten = t
res = sum(taste) - eaten
print(res)
# Judge status: Wrong Answer
import math
x,y = map(int,input().split())
print(math.floor(math.log2(y)-math.log2(x))+1)
# Judge status: Accepted
import math
n = int(input())
mn = n+1
for num in range(1,int(math.sqrt(n)+1)) :
    if n%num == 0 :
        num2 = n // num
        mn = min(num+num2,mn)
print(mn-2)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
b=[0]*9
for i in a:
  b[min(i//400,8)]+=1
print(max(8-b[:8].count(0),1),8-b[:8].count(0)+b[8])
# Judge status: Accepted
a, b, x = map(int, input().split())
aa = b//x
bb = a//x
if a%x != 0:
	print (aa-bb)
else:
	print (aa-bb+1)
# Judge status: Accepted
N,K=map(int,input().split())
A=[list(map(int,input().split())) for i in range(N)]
A.sort()
k=K
i=0
while k>0:
  k-=A[i][1]
  ans=A[i][0]
  i+=1
print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())

for i in range(b):
    q, r = divmod(a*i, b)
    if r == c:
        print('YES')
        exit()
print('NO')
# Judge status: Accepted
o = input()
e = input()

pw = ''
for i in range(len(o)):
    pw += o[i]
    if i < len(e):
        pw += e[i]
print(pw)
# Judge status: Accepted
N = int(input())
l = []
for i in range(1, N + 1, 2):
  count = 0
  for j in range(1, i + 1, 2):
    if i % j == 0:
      count += 1
  if count == 8:
    l.append(i)
print(len(l))
# Judge status: Accepted
n,m=map(int,input().split())
print(min(n,m//2)+max(0,(m-2*n)//4))
# Judge status: Accepted
n,m,k=map(int,input().split())

if k>n*m:
    print('No')
    exit()
    
if k%n==0 or k%m==0:
    print('Yes')
    exit()
k=min(m*n-k,k)
for i in range(1,n):
    for j in range(1,m):
        if i*m+j*n-2*i*j==k:
            print('Yes')
            exit()
print('No')
# Judge status: Wrong Answer

n = int(input())
num_list =  list(map(int,input().split()))
num_list2 = [0]*n
num_list3 = [0]*n
for i in num_list:
    num_list2[i-1] += 1
for i in range(n):
    num_list3[i-1] = n*(n-1) // 2

for i in num_list:
    ans = n*(n-1) // 2
    print(ans-num_list3[i-1]+sum(num_list3))
  #  elif size == 1:
        #ans = 0
   # else :
    #    ans = 0 
    #num_list5[num_list2[i]-1] = ans