Harryxun/stf_run huggingface dataset:
import numpy as np
A, B = map(int, input().split())
print(np.lcm(A, B))

### FIXED CODE ###

from fractions import gcd
A, B = map(int, input().split())
print((A*B)//gcd(A, B))
import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
elif (len(b) == 1):
    if list(k.keys())[0] == 0:
        ans = "Yes"
elif (len(b) == 2):
    if n % 3 == 0:
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[1])):
            ans = "Yes"
print(ans)

### FIXED CODE ###

import collections
n = int(input())
a = [int(i) for i in input().split()]
b = collections.Counter(a)
ans = "No"
if (len(b) == 3):
    if (list(b.keys())[0] ^ list(b.keys())[1] ^ list(b.keys())[2]) == 0:
        if ((list(b.values())[0] == list(b.values())[1]) & (list(b.values())[0] == list(b.values())[2])):
            ans = "Yes"
elif (len(b) == 1):
    if list(b.keys())[0] == 0:
        ans = "Yes"
elif (len(b) == 2):
    if (n % 3 == 0):
        dd = list(b.keys())
        dd.sort()
        if (dd[0] == 0) & ((b[0] * 2) == (b[dd[1]])):
            ans = "Yes"
print(ans)
b = int(input())
print('A' if b.islower() else 'a')

### FIXED CODE ###

a = input()
print('A' if a.isupper() else 'a')
a,b,c = map(int,input().split)
print(min(a+b,a+c,b+c)

### FIXED CODE ###

a,b,c = map(int,input().split())
print(min(a+b,a+c,b+c))
from itertools import accumulate
N, M = map(int, input().split())
 
AB = []
 
for i in range(N):
    a, b = map(int, input().split())
    AB.append([a, b])

AB.sort(key=lambda x: x[0])
whole = [None]*sum([i[1] for i in AB])
cnt = 0
 
for ab in AB:
    for b in range(ab[1]):
        whole[cnt] = ab[0]
        cnt += 1

ans = list(accumulate(whole))

print(ans[M-1])

### FIXED CODE ###

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

AB = []

for i in range(N):
    a, b = map(int, input().split())
    AB.append([a, b])

AB.sort()

ans = 0
cnt = 0

for ab in AB:
    for b in range(ab[1]):
        ans += ab[0]
        cnt += 1
        if cnt==M:
            break
    if cnt==M:
        break

print(ans)
from functools import reduce
from math import gcd

N, K=map(int, input().split())
an=list(map(int,input().split()))

m = max(an)
g = reduce(lambda x, y: gcd(x, y), an)

if K <=m and K % g == 0:
    print ('POSSIBLE')
else:
    print ('IMPOSSIBLE')

### FIXED CODE ###

from functools import reduce
from fractions import gcd

N, K=map(int, input().split())
an=list(map(int,input().split()))

m = max(an)
g = reduce(lambda x, y: gcd(x, y), an)

if K <=m and K % g == 0:
    print ('POSSIBLE')
else:
    print ('IMPOSSIBLE')
import sys
input = sys.stdin.readline
import queue
sys.setrecursionlimit(1000000000)

N, Q = list(map(int, input().split()))
graph = [[] for i in range(N)]
# 最初にroot pointを定めて:
# graph構造に大して点を与える...
for i in range(N-1):
    a, b = list(map(int, input().split()))
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)

points = [0] * N
for _ in range(Q):
    p, x = list(map(int, input().split()))
    points[p-1] += x

visited = [False] * N
tot_points = [0] * N
tot_points[0] = points[0]

nodes = graph[0]
visited[0] = True


def dfs(old_node, node):
    if visited[node]:
        return
    tot_points[node] = tot_points[old_node] + points[node]
    visited[node] = True
    nodes = graph[node]
    for _node in nodes:
        dfs(node, _node)
for _node in nodes:
    dfs(0, _node)

for x in tot_points.tolist():
    print(x, end=" ")
    
    

### FIXED CODE ###

import sys
from queue import deque
input = sys.stdin.readline

def main():
    N, Q = list(map(int, input().split()))
    graph = [[] for i in range(N)]
    # 最初にroot pointを定めて:
    # graph構造に大して点を与える...
    for i in range(N-1):
        a, b = list(map(int, input().split()))
        graph[a-1].append(b-1)
        graph[b-1].append(a-1)
    
    points = [0] * N
    for _ in range(Q):
        p, x = list(map(int, input().split()))
        points[p-1] += x
    
    visited = [False] * N
    
    nodes = deque([0])

    while nodes:
        node = nodes.pop()
        visited[node] = True
        for _node in graph[node]:
            if visited[_node]:
                continue
            points[_node] += points[node]
            nodes.append(_node)
    
    print(*points)
    
main()
import collections

n=int(input())
for i in range(n):
    s=list(map(str,input()))
m=int(input())
for j in range(m):
    t=list(map(str,input()))

cs=collections.Counter(s)
ct=collections.Counter(t)

cst=cs-ct

print(max(cst))

### FIXED CODE ###

n=int(input())
s=[input() for _ in range(n)]
m=int(input())
t=[input() for _ in range(m)]
result=0
for i in set(s):
    result=max(result,s.count(i)-t.count(i))
print(result)
import collections
from sympy import prime

N = int(input())
count = 1
lis = [0]*N

for i in range(N):
  s = input()
  for j in range(10):
    count *= prime(ord(s[j])-ord("a")+1)
  lis[i] += count
  count = 0

dic = collections.Counter(lis)
newlis = list(dic.values())
ans = sum([(i*(i-1))//2 for i in newlis]) 

print(ans)

### FIXED CODE ###

from collections import defaultdict

N = int(input())
S = defaultdict(int)

for i in range(N):
  s = sorted(input())
  w = "".join(s)
  S[w] += 1

ans = sum([(i*(i-1))//2 for i in list(S.values())])

print(ans)
def abc070_d():
    import sys
    read = sys.stdin.buffer.read
    inp = iter(map(int, read().split()))

    import numpy as np
    from scipy.sparse import csr_matrix
    from scipy.sparse.csgraph import dijkstra

    n = next(inp)
    adjmtx = np.zeros((n, n), dtype=np.int32)
    for _ in range(n-1):
        a = next(inp) - 1
        b = next(inp) - 1
        c = next(inp)
        adjmtx[a, b] = c
        adjmtx[b, a] = c

    q = next(inp)
    k = next(inp) - 1

    graph = csr_matrix(adjmtx)
    dist = dijkstra(csgraph=graph, indices=k)
    eps = 1e-6

    for _ in range(q):
        x = next(inp) - 1
        y = next(inp) - 1
        ans = int(dist[x] + dist[y] + eps)
        print(ans)

if __name__ == '__main__':
    abc070_d()

### FIXED CODE ###

def abc070_d():
    import sys
    sys.setrecursionlimit(10010010)
    read = sys.stdin.buffer.read
    inp = iter(map(int, read().split()))

    n = next(inp)
    adjlist = [[] for _ in range(n)]
    for _ in range(n-1):
        a = next(inp) - 1
        b = next(inp) - 1
        c = next(inp)
        adjlist[a].append((b, c))
        adjlist[b].append((a, c))

    q = next(inp)
    k = next(inp) - 1

    dist = [-1] * n

    def dfs(x:int, d:int):
        dist[x] = d
        for nx, nd in adjlist[x]:
            if dist[nx] != -1: continue
            dfs(nx, d + nd)

    dfs(k, 0)

    for _ in range(q):
        x = next(inp) - 1
        y = next(inp) - 1
        ans = dist[x] + dist[y]
        print(ans)

if __name__ == '__main__':
    abc070_d()
n, m = map(int, input().split())
ls = []
rs = []

for _ in range(m):
    l, r = map(int, input().split())
    ls.append(l)
    rs.append(r)

l_max = max(l)
r_min = min(r)
master_card_num = r_min - l_max

if master_card_num < 0:
    print(0)
else:
    print(master_card_num + 1)

### FIXED CODE ###

n, m = map(int, input().split())
ls = []
rs = []

for _ in range(m):
    l, r = map(int, input().split())
    ls.append(l)
    rs.append(r)

l_max = max(ls)
r_min = min(rs)
master_card_num = r_min - l_max

if master_card_num < 0:
    print(0)
else:
    print(master_card_num + 1)
x = int(input())
for i in range(65):
  s = (x-i**5)**0.2
  t = (x+i**5)**0.2
  if s.is_integer():
    print(int(s),-i)
    break
  elif t.is_integer():
    print(int(t), i)
    break

### FIXED CODE ###

import math
x = int(input())
i = 0
while True:
  if (i**5 <= x):
    s = (x-i**5)**0.2
    s = math.floor(s*(10**7))/(10**7)
  t = (x+i**5)**0.2
  t = math.floor(t*(10**7))/(10**7)
  if s.is_integer() and i**5 <= x:
    print(int(s),-i)
    break
  elif t.is_integer():
    print(int(t), i)
    break
  i += 1
# -*- coding: utf-8 -*-
a, b, c, k = map(int, input().split())
L = [1]*a+[0]*b+[-1]*c
cnt = 0
for i in range(k):
    cnt += L[i]
print(cnt)

### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b, c, k = map(int, input().split())
cnt = 0
if k <= a:
    cnt += k
elif (a < k <= a+b):
    cnt += a
elif (a+b < k < a+b+c):
    cnt += a - (k-(a+b))
else:
    cnt += a - c
print(cnt)
N,A,B,C,D = map(int,input().split())
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1
 
 
pass_path = False
if C > D:
    for b in range(B-1,D):
        if S[b-1] == '.' and S[b+1] == '.':
             path_pass = True
            continue
        elif S[b] == '#':
            break

if step(A,C) and step(B,D)  and pass_path == True:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N,A,B,C,D = map(int,input().split())
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1

Ans = step(A,C) and step(B,D)
 
if C > D:
    pass_path = False
    for b in range(B-1,D):
        if S[b] == '#':
            continue
        if S[b-1] == '.' and S[b+1] == '.':
            pass_path = True
            break
    Ans = step(A,C) and step(B,D) and  pass_path


if Ans == True:
    print('Yes')
else:
    print('No')
A = int(input())
B = int(input())
k, l = 0, 0

while l < B:
  k += 1
  if k == 0:
    l += A
  else:
    l += A - 1
  
print(k)

### FIXED CODE ###

A, B = map(int, input().split())
k, l = 0, 0
if B != 1:
  while l < B:
    if k == 0:
      l += A
    else:
      l += A - 1
    k += 1
  print(k)
elif B == 1:
  print(0)
n=int(input())
A=list(map(int,input.split())
h=[]
for i in range(1,n+1)
       h.append(A.index(i)+1)
print(*h)



### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
ans = [0] * N
for i, a in enumerate(A):
  ans[a-1] = i+1
print(*ans)
n, k = map(int,input().split())
from math import factorial
ans = []
for i in range(1, k+1):
    c = factorial(n-k+1) // (factorial(n-k+1 - i) * factorial(i))
    if i > k-i:
        c2 = factorial(i) // (factorial(i-(k-i)) * factorial(k-i))
    else:
        c2 = 1
    if c == 0:
        break
    ans.append(c*c2)

mod = 10**9 + 7
for j in ans:
    print(j%mod)

### FIXED CODE ###

import math
def C(n,r):
  if n<0 or r<0 or n-r<0:
    return 0
  else:
    return math.factorial(n)//(math.factorial(r)*math.factorial(n-r))
 
n,k=map(int,input().split())
for i in range(1,k+1):
  print(C(n-k+1,i)*C(k-1,i-1)%(10**9+7))
N = int(input())
list_S = []
for i in range(N):
  if not str(input()) in list_get: list_S.append(str(input()))
print(len(list_get))

### FIXED CODE ###

N = int(input())
list_S = [str(input()) for i in range(N)]
print(len(list(set(list_S))))
n=int(input())
l=list(map(int,input(),split()))

s=min(l)
g=max(l)
ans=0
for k in range (n):
  ans+=(l[k]-s)**2

for i in range(s+1,g+1):
  hyp=0
  for j in range (n):
    hyp+=(l[j]-i)**2
  if hyp<ans:
    ans=hyp
    
print (ans)

### FIXED CODE ###

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

s=min(l)
g=max(l)
ans=0
for k in range (n):
  ans+=(l[k]-s)**2

for i in range(s+1,g+1):
  hyp=0
  for j in range (n):
    hyp+=(l[j]-i)**2
  if hyp<ans:
    ans=hyp
    
print (ans)
a = int(input())
b = int(input())
c = a*500
if c>=b:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b = map(int,input().split())
c = a*500
if c>=b:
  print("Yes")
else:
  print("No")
S = input()
N = [chr(i) for i in range(97,123) if chr(i) not in S]

if len(S) == 26:
  if S == "zyxwvutsrqponmlkjihgfedcba":
    print(-1)
  else:
    LS = list(S)
    sLS = sorted(LS)
    print(LS)
    print(sLS)
    for i in range(0,27):
      if LS[i] != sLS[i]:
        S = S[:i - 1] + sLS[i]
        break
else:
  S = S + N[0]
  
print(S)

### FIXED CODE ###

S = input()

if len(S) < 26:
  N = [chr(i) for i in range(97,123) if chr(i) not in S]
  print(S + N[0])
else:
  for i in range(26):
    for j in range(i+1):
      if S[-(i + 1)] < S[-(j + 1)]:
          print(S[:-(i+1)]+S[-(j+1)])
          exit()
  else:
    print(-1)
s= input()
def dfs(i,f,sum):
    if i==3:
        if sum ==7:
            print(f+'=7')
            exit()
    else:
        dfs(i+1,f+"-"+s[i+1],sum-int(s[i+1]))
        dfs(i+1,f+"+"+s[i+1],sum+int(s[i+1]))
dfs(0,s[0],int(s[0])

### FIXED CODE ###

def dfs(i, f, sum):
    if i == 3:
        if sum == 7:
            # 答えは1つ出力すれば良いので =7 になれば終了
            print(f + "=7")
            exit()

    else:
        # 式 f の末尾に符号と次の数字を追加し、その分 sum に加減する
        dfs(i + 1, f + "-" + s[i + 1], sum - int(s[i + 1]))
        dfs(i + 1, f + "+" + s[i + 1], sum + int(s[i + 1]))


s = input()

dfs(0, s[0], int(s[0]))
N = int(input())
i = 0
goods = []
while i < N:
    goods.append(int(input()))
    i += 1

ans = sum(goods) - max(goods) + (max(goods) // 2)
print(ans)

### FIXED CODE ###

N=int(input())
if N%10==3:
    print("bon")
elif N%10==0 or N%10==1 or N%10==6 or N%10==8:
    print("pon")
else:
    print("hon")
n,W=map(int,input().split())
dp=[[0]*(w+1) for _ in range(n+1)]
for i in range(1,n+1):
	w,v=map(int,input().split())
	for j in range(1,W+1):
		if j-w>0:
			dp[i][j]=dp[i-1][j]
		else:
			dp[i][j]=max(dp[i-1][j],dp[i-1][j-w]+v)
print(max(dp[n])

### FIXED CODE ###

n,W=map(int,input().split())
dp=[[0]*(W+1) for _ in range(n+1)]
for i in range(1,n+1):
    w,v=map(int,input().split())
    for j in range(1,W+1):
        if j-w<0:
            dp[i][j]=dp[i-1][j]
        else:
            dp[i][j]=max(dp[i-1][j],dp[i-1][j-w]+v)
print(max(dp[n]))
n,m,k = list(map(int,input().split()))
a = list(map(int,input().split()))
b = list(map(int,input().split()))

from collections import deque
sa = deque([x for x in a])
sb = deque([x for x in b])
sa.append(10**9+1)
sb.append(10**9+1)
ans = 0
def cnt(a,b,time):
  global ans
  #print(ans, time,a,b)
  if (time <= k) & ( (len(a) > 1) | (len(b) > 1)):
    if a[0] < b[0]:
      time += a[0]
      a.popleft()
    else:
      time += b[0]
      b.popleft()
    if time <= k:
      ans += 1
      cnt(a,b,time)

cnt(sa,sb,0)
print(ans)

### FIXED CODE ###

n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
sa = [0] * (n + 1)
sb = [0] * (m + 1)
for i in range(n):
  sa[i + 1] = sa[i] + a[i]
for i in range(m):
  sb[i + 1] = sb[i] + b[i]
r = m
ans = 0
for i in range(n + 1):
  if sa[i] > k:
    break
  while sa[i] + sb[r] > k:
    r -= 1
  ans = max(ans, i + r)
print(ans)
n,q = map(int, input().split())

boss = {}
point = {}
point[n] = 0
for i in range(1,n):
    a,b = map(int, input().split())
    boss[b] = a
    point[i] = 0

for i in range(q):
    p,x = map(int, input().split())
    point[p] += x

ans = str(point[1])
for i in range(2,n+1):
    point[i] += point[boss[i]]
    ans = ans + " " + str(point[i])

print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline

from collections import deque

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

edge = {}
for i in range(1,n+1):
    edge[i] = []

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

ans = [0] * (n+1)
for i in range(q):
    p,x = map(int,input().split())
    ans[p] += x

d = deque()
remains = set(range(1,n+1))
d.append(1)
remains.remove(1)

while(len(d) > 0):
    tmp = d.pop()
    for i in edge[tmp]:
        if(i in remains):
            ans[i] += ans[tmp]
            d.append(i)
            remains.remove(i)

print(' '.join(map(str, ans[1:])))
n = int(input())

points = [list( map(int,input().split(" "))) for _ in range(n)]
X = 0
Y = 1
ans = 10 ** 14
for i  in range(n):
  for j in range(n):
    if i == j:
      continue
    x1,y1 = points[i]
    x2,y2 = points[j]
    p = x1 - x2
    q = y1 - y2
    cost = n
    for point1 in points: #そのpointからcost0で遷移できる先があるかどうか
      fromx,fromy = point1
      for point2 in points:
        tox,toy = point2
        if fromx - tox == p and fromy - toy == q:
          cost -= 1
          break
    if ans < cost:
      ans = cost
print(cost)
        
      
    

### FIXED CODE ###

n = int(input())

points = [list(map(int, input().split(" "))) for _ in range(n)]
X = 0
Y = 1
ans = 10 ** 14
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        x1, y1 = points[i]
        x2, y2 = points[j]
        p = x1 - x2
        q = y1 - y2
        cost = n
        for point1 in points:  # そのpointからcost0で遷移できる先があるかどうか
            fromx, fromy = point1
            for point2 in points:
                tox, toy = point2
                if fromx - tox == p and fromy - toy == q:
                    cost -= 1
                    break
        if ans > cost:
            ans = cost
if n == 1:
    print(1)
else:
    print(ans)
n = input()
for i in range(1,n+1):
	if i%3==0 or str(i).count.("3"):
		print i

### FIXED CODE ###

n=input()
print"",
for i in range(1,n+1):
	if i%3==0 or str(i).count('3'):
		print i,
a = int(input())
b = int(input())
if a % 2 is 1 and b % 2 is 1:
  print('Odd')
else:
  print('Even')

### FIXED CODE ###

a, b = map(int, input().split())
if a % 2 is 1 and b % 2 is 1:
  print('Odd')
else:
  print('Even')
import collections

n = int(input())
s = input()
res = 0
# for i in range(0, n):
#     for j in range(i+1,n):
#         if s[i] != s[j]:
#             for k in range(j+1,n):
#                 if j-i!=k-j and s[i] != s[k] and s[j] != s[k]:
#                     res += 1
#
# print(res)
num = collections.Counter(s)
# print(num)
num_r = num["R"]
num_g = num["G"]
num_b = n - num_r - num_g
count_2 = 0
for x in range(1,int(n/2)+1):
    for i in range(n-2*x-i):
        # print(x)
        # print(i)
        # print()
        if (i + 2 * x < n and s[i] != s[i + x] and s[i + x] != s[i + 2 * x] and s[i] != s[i + 2 * x] ):
            count_2 += 1
            # print(x)
            # print(i)
            # print()

res = num_r * num_g * num_b - count_2
# print(num_r)
# print(num_g)
# print(num_b)
print(res)

### FIXED CODE ###

import collections

n = int(input())
s = input()
res = 0
# for i in range(0, n):
#     for j in range(i+1,n):
#         if s[i] != s[j]:
#             for k in range(j+1,n):
#                 if j-i!=k-j and s[i] != s[k] and s[j] != s[k]:
#                     res += 1
#
# print(res)
num = collections.Counter(s)
# print(num)
num_r = num["R"]
num_g = num["G"]
num_b = n - num_r - num_g
count_2 = 0
for x in range(1,int(n/2)+1):
    for i in range(n-2*x):
        # print(x)
        # print(i)
        # print()
        if (i + 2 * x < n and s[i] != s[i + x] and s[i + x] != s[i + 2 * x] and s[i] != s[i + 2 * x] ):
            count_2 += 1
            # print(x)
            # print(i)
            # print()

res = num_r * num_g * num_b - count_2
# print(num_r)
# print(num_g)
# print(num_b)
print(res)
import numpy as np

n = int(input())
h = np.array([int(i) for i in input().split()])

d = np.diff(h)
dd = np.array([d[i]+d[i+1] for i in range(len(d)-1)])

if n == 1:
  print('Yes')
elif (d>=-1) and (dd>=-1).all():
  print('Yes')
else:
  print('No')

### FIXED CODE ###

import numpy as np

n = int(input())
h = np.array([int(i) for i in input().split()])

err = 0
f = 0
for i in range(n-1):
  t = h[i+1] - h[i]
  if t>=-1 and f>=-1 and not(t==-1 and f==-1):
    pass
  else:
    err = 1
    break
    
  if t!=0:
    f = t
  
if err==1:
  print('No')
else:
  print('Yes')
N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
    x[i], y[i] = map(int, input().split())

counter = 0
for i in range(N):
    a = x[i]-x[0]
    b = y[i]-y[0]
    for j in range(1,N):
        for k in range(j,N):
            if a == x[j]-x[k] and b == y[j]-y[k]:
                counter += 1
if N==2:
  print(1)
else:
  print(counter-1)

### FIXED CODE ###

a,b = map(int,input().split())
if b == 1:
    print(0)
else:
    print(a-b)
a,b=map(int,input().split())
if a>9:
    print('b')
else
    print(b-(100＊(10-b)

### FIXED CODE ###

a,b=map(int,input().split())
if a>9:
  print(b)
else:
  print(b+(100*(10-a)))
#atcoder template
def main():
    import sys
    imput = sys.stdin.readline
    #文字列入力の時は上記はerrorとなる。
    #ここにコード
    #input
    N = int(input())
    A = list(map(int, input().split()))
    D = Counter(A)
    S = sum(A)
    Q = int(input())
    B = [0] * Q
    C = [0] * Q
    for i in range(Q):
        b, c = map(int, input().split())
        x = D[b]
        y = D[c]
        temp = -x * b + x * c
        print(S+temp)
        S += temp
        D[b] = 0
        D[c] += x  

    #N = 1のときなどcorner caseを確認！
if __name__ == "__main__":
    main()

### FIXED CODE ###

#atcoder template
def main():
    import sys
    imput = sys.stdin.readline
    #文字列入力の時は上記はerrorとなる。
    #ここにコード
    #input
    from collections import Counter
    N = int(input())
    A = list(map(int, input().split()))
    D = Counter(A)
    S = sum(A)
    Q = int(input())
    B = [0] * Q
    C = [0] * Q
    for i in range(Q):
        b, c = map(int, input().split())
        x = D[b]
        y = D[c]
        temp = -x * b + x * c
        print(S+temp)
        S += temp
        D[b] = 0
        D[c] += x  

    #N = 1のときなどcorner caseを確認！
if __name__ == "__main__":
    main()
str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 

a = int(input())
s = list(input())

ans = ''
for char in s:
    
    c = str.index(char) + a 

    if c > 27:
        c = c - 26
    ans = ans + str[c] #文字列は加算できる

print(ans)

### FIXED CODE ###

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 

a = int(input())
s = list(input())

ans = ''
for char in s:
    
    c = str.index(char) + a 

    if c >= 26:
        c = c - 26
    ans = ans + str[c] #文字列は加算できる

print(ans)
N, A, B = map(int,input().split());
X[N] = map(int,input().split);

for i in range(N-1):
    dist[i] = X[i+1]-X[i];

fatigue = 0;
for i in dist:
    if i*A<B:
        fatigue += i * A;
    else:
        fatigue += B;

print(fatigue);


### FIXED CODE ###

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

dist =[X[i+1]-X[i] for i in range(N-1)];

fatigue = 0;
for i in dist:
    if i*A<B:
        fatigue += i*A;
    else:
        fatigue += B;

print(fatigue);
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
b_list = []
for i in range(n+1):
    if i == a_list[i]:
        b_list[i] += 1
    else:
        b_list[i] = 1
b_list.sort(reverse = True)
f = sum(b_list[:k:])
print(n-f)


### FIXED CODE ###

import collections
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
b = collections.Counter(a_list)
d = b.most_common()[k:]
sum = 0
for i in d:
    sum += i[1]
print(sum)
a, b, c = map(int, input().split(' '))
if a + b + c != 17:
  print('NO')
else if a * b * c != 175:
  print('NO')
else:
  print('YES')

### FIXED CODE ###

a, b, c = map(int, input().split(' '))
if a + b + c != 17:
  print('NO')
elif a * b * c != 175:
  print('NO')
else:
  print('YES')
a,b = map(int, input().split())
if a*b // 2 == 0:
  print('Even')
  else:
  	print('Odd')

### FIXED CODE ###

a,b = map(int, input().split())
if a * b % 2 == 0:
  print('Even')
else:
  print('Odd')
import sys
input = sys.stdin.readline #for input speed
# sys.setrecursionlimit(10**7)
from fractions import gcd
def lcm(a, b):
    return a * b // gcd(a, b)
N, M = map(int, input().split())
B = set(map(lambda x: int(x)//2, input().split()))
power = 1
for b in B:
    if b == 2:
        continue
    power = lcm(power, b//2)

mn = min(B)

mn2 = mn // 2
p2 = power // mn2

if p2 % 2 == 0:
    print(0)
    exit()
ans1 = M // mn2 // p2
ans2 = M // mn2 // (p2*2)
print(ans1-ans2)


### FIXED CODE ###

from fractions import gcd
def lcm(a, b):
    return a * b // gcd(a, b)
N, M = map(int, input().split())
B = set(map(lambda x: int(x)//2, input().split()))
power = 1
for b in B:
    power = lcm(power, b)

mn = min(B)
p2 = power // mn

if p2 % 2 == 0:
    print(0)
    exit()
ans1 = M // mn // p2
ans2 = M // mn // (p2 * 2)
print(ans1-ans2)
X=input()
 
if 30<=X :
  print("Yes")
else :
  print("No")

### FIXED CODE ###

print("Yes") if int(input()) >= 30 else print("No")