Harryxun/stf_run huggingface dataset:
print("A"+{input()[8]}+"C")

### FIXED CODE ###

print("A"+input()[8]+"C")
n,u,v = map(int,input().split())
u -= 1
v -= 1
G = [[] for _ in range(n)]
for _ in range(n-1):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    G[a].append(b)
    G[b].append(a)

dist = [-1]*n
dist[v] = 0
prev = [-1]*n
def dfs(now):
    for nxt in G[now]:
        if dist[nxt] != -1: continue
        dist[nxt] = dist[now]+1
        prev[nxt] = now
        dfs(nxt)
dfs(v)

color = [0]*n
now = u
while now >= 0:
    color[now] = 1
    now = prev[now]

def dfs2(now,prev,dist,cnt):
    if dist == 0: return cnt
    if dist == -1: return cnt-1
    if G[now] == [prev]: return cnt+dist-1
    res = 0
    for nxt in G[now]:
        if nxt == prev: continue
        if color[nxt]: res = max(res,dfs2(nxt,now,dist-2,cnt+1))
        else: res = max(res,dfs2(nxt,now,dist,cnt+1))
    return res

print(dfs2(u,-1,dist[u]-dist[v],0))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000000)

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

distT = [-1]*n
distA = [-1]*n
distT[u] = 0
distA[v] = 0
def dfs(now,dist):
    for nxt in G[now]:
        if dist[nxt] != -1: continue
        dist[nxt] = dist[now]+1
        dfs(nxt,dist)
dfs(u,distT)
dfs(v,distA)

mx = 0
for i in range(n):
    if distT[i] < distA[i]:
        mx = max(mx, distA[i])
ans = mx-1
print(ans)
b=int(input())

e_dict={
  'A':'T',
  'T':'A',
  'G':'C',
  'C':'G'
}

print(e_dict[b])
 

### FIXED CODE ###

b=input()

e_dict={
  'A':'T',
  'T':'A',
  'G':'C',
  'C':'G'
}

print(e_dict[b])
import sys

n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ak=[]
aa=0
for i in a:
    aa+=i
    ak.append(aa)
bk=[]
bb=0
for i in b:
    bb+=i
    bk.append(bb)
ass=bs=0
for i in range(len(ak)):
    if ak[i]<=k:
        ass=i+1
    else:
        break
for i in range(len(bk)):
    if bk[i]+ak[ass-1]<=k:
        bs=i+1
    else:
        break
wk=ass+bs
aswk=ass
bswk=bs
if wk==n+m:
    print(n+m)
    sys.exit()

for i in range(ass-2,-1,-1):
    while k> ak[i]+bk[bswk]:
        bswk+=1
        if bswk<=m:
            break
an = max(ass+bs,i+bswk)        
        
print(an)

### FIXED CODE ###

import numpy as np

n,m,k=map(int,input().split())
a=np.array(list(map(int,input().split())))
b=np.array(list(map(int,input().split())))

ak=np.cumsum(a,dtype=np.int64)
bk=np.cumsum(b,dtype=np.int64)
ak=ak[ak<=k]
bk=bk[bk<=k]
lak=len(ak)
lbk=len(bk)

an=lak
j=0
for i in range(lak-1,-1,-1):
    while bk[j]+ak[i]<=k:
        an=max(an,i+j+2)
        j+=1
        if j>=lbk:
            j-=1
            break
an=max(an,lbk)

print(an)
enpitu = input("":)
honsuu = enpitu // 10
if enpitu == 3:
	print("bon")
elif enpitu == 0, 1, 6, 8:
	print("pon")
else:
	print("hon")


### FIXED CODE ###

n = int(input()) % 10
if n == 3:
    print("bon")
elif n in {0, 1, 6, 8}:
    print("pon")
else:
    print("hon")
a = int(input())
if a==7 or a==5 or a==3:
	print("YES")
else print("NO")

### FIXED CODE ###

a = int(input())
if a==7 or a==5 or a==3:
	print("YES")
else:
	print("NO")
import itertools
import numpy as np

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

coin = []
for i in range(1, m+1):
  for v in itertools.combinations(books, i):
    comb = list(v)
    result = np.sum(comb, axis = 0)
    if result[1] >= x and result[2] >= x and result[3] >= x:
      coin.append(result[0])

if len(coin) > 0:
  sorted(coin, reverse=False)
  print(coin[0])
else:
  print(-1)

### FIXED CODE ###

import itertools
import numpy as np

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

coin = []
for i in range(1, n+1):
  for v in itertools.combinations(books, i):
    comb = list(v)
    result = np.sum(comb, axis = 0)
    
    flag = True
    for j in range(1,m+1):
      if result[j] < x:
        flag = False
        break
    if flag:
      coin.append(result[0])

if len(coin) > 0:
  coin.sort(reverse=False)
  print(coin[0])
else:
  print(-1)
A, B, C, D, E, F = map(int, input().split())


def main():
    sa = {100 * i * A + 100 * j * B
          for i in range(F) for j in range(F)
          if 100 * i * A + 100 * j * B <= F and i + j != 0}

    sb = {i * C + j * D for i in range(F) for j in range(F)
          if i * C + j * D <= F and i + j != 0}

    a = sorted(sa)
    b = sorted(sb)

    conc = 0.0

    for i in a:
        for j in b:
            if F < i + j:
                break
            if E * i / 100 < j:
                break

            if conc < j / (i + j) * 100:
                conc = j / (i + j) * 100
                water = i
                sugar = j

    print(water + sugar, sugar)
    return


main()


### FIXED CODE ###

A, B, C, D, E, F = map(int, input().split())

ans = {}


def main():
    MAX_A = F // (100 * A)

    for i in range(MAX_A + 1):
        MAX_B = (F - i * 100 * A) // (100 * B)

        for j in range(MAX_B + 1):
            if i == 0 and j == 0:
                continue

            a = i * A + j * B

            SAT = a * E

            CD = F - a * 100

            SAT_FLG = True

            if CD < SAT:
                SAT_FLG = False

            CD = min(SAT, CD)

            MAX_C = CD // C

            for k in range(MAX_C + 1):
                l = (CD - k * C) // D

                b = k * C + l * D

                if SAT == b:
                    print(a * 100 + b, b)
                    return

                LACK = SAT - b
                if not LACK in ans:
                    # Create New
                    ans[LACK] = (a * 100 + b, b, SAT_FLG)
                elif not ans[LACK][-1]:
                    # SAT_FLG False
                    # Overwrite
                    ans[LACK] = (a * 100 + b, b, SAT_FLG)

    print(" ".join([str(i) for i in ans[min(ans.keys())][:-1]]))
    return


main()
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
#mod = 10 ** 9 + 7 
mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

N = INT()
xy = [LIST() for _ in range(N)]

xy.sort(key = lambda x: x[0])
diff = []

for s, t in combinations(xy, 2):
	st = str(t[0]-s[0]) + " " +str(t[1]-s[1])
	diff.append(st)

print(max(N - Counter(diff).most_common()[0][1], 1))


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
#mod = 10 ** 9 + 7 
mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

N = INT()
xy = [LIST() for _ in range(N)]

if N == 1:
	print(1)
	exit()

xy.sort(key = lambda x: (x[0], x[1]))
diff = []

for s, t in combinations(xy, 2):
	st = str(t[0]-s[0]) + " " +str(t[1]-s[1])
	diff.append(st)

print(max(N - Counter(diff).most_common()[0][1], 1))
n, k = map(int,input().split())
a_list = list(map(int,input().split()))
a_list.sort()

import math

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

max_val = 0
min_val = 0
val = cmb(n-1, k-1)
for i in range(n-k+1):
    if i != 0:
        val = val*(n-i-k+1)/(n-i)
    max_val = (max_val + (((a_list[-(i+1)])*val)))%(10**9+7)
    min_val = (min_val + ((a_list[i])*val))%(10**9+7)


print(int((max_val-min_val)%(10**9+7)))

### FIXED CODE ###

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


mod = 10 ** 9 + 7
f_list = [1]
for i in range(1,n+1):
    f_list.append((f_list[-1] * i) % mod)
def comb(n,r):
    return f_list[n] * (pow(f_list[r], mod-2, mod) * pow(f_list[n-r], mod-2, mod) % mod) % mod


max_val = 0
min_val = 0
for i in range(n - k + 1):
    val = comb(n - i - 1, k - 1)
    max_val = (max_val + (((a_list[-(i + 1)]) * val))) % (10 ** 9 + 7)
    min_val = (min_val + ((a_list[i]) * val)) % (10 ** 9 + 7)

print(int((max_val - min_val) % (10 ** 9 + 7)))
import math
n, d = [int(i) for i in input().split()]
dot = []
for _ in range(n):
  zahyo = list(map(int, input().split()))
  dot.append(zahyo)
cnt = 0
for i in range(n-1):
  for j in range(i+1, n):
    for k in range(d):
      test += pow(dot[i][k] - dot[j][k], 2)
    test_a = float(math.sqrt(test))
    test_b = int(math.sqrt(test))
    if(test_a == test_b):
      cnt += 1
print(cnt)

### FIXED CODE ###

import math
n, d = [int(i) for i in input().split()]
dot = []
for _ in range(n):
  zahyo = list(map(int, input().split()))
  dot.append(zahyo)
cnt = 0
for i in range(n-1):
  for j in range(i+1, n):
    test = 0
    for k in range(d):
      test += pow(dot[i][k] - dot[j][k], 2)
    test_a = float(math.sqrt(test))
    test_b = int(math.sqrt(test))
    if(test_a == test_b):
      cnt += 1
print(cnt)
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def MAP1()  : return map(lambda x:int(x)-1,input().split())
def LIST()  : return list(MAP())
def LIST1() : return list(MAP1())

def solve():
    N = INT()
    xbin = input()
    xdec = int(xbin, 2)
    m = xbin.count('1')

    num = [0]*2*10**5
    for i in range(1, 2*10**5):
        num[i] = num[i % bin(i).count('1')] + 1

    pop = [m + 1, m - 1]
    x = [xdec % pop[0], xdec % pop[1]]

    reg = [[0]*2 for i in range(N)]
    reg[N-1] = [1, 1]
    for i in range(N-2, -1, -1):
        reg[i][0] = reg[i+1][0]*2 % pop[0]
        reg[i][1] = reg[i+1][1]*2 % pop[1]

    for i in range(N):
        if xbin[i] == '0':
            y = ( x[0] + reg[i][0] ) % pop[0]
        else:
            y = ( x[1] - reg[i][1] ) % pop[1]
        print(num[y] + 1)

if __name__ == '__main__':
    solve()

### FIXED CODE ###

from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def MAP1()  : return map(lambda x:int(x)-1,input().split())
def LIST()  : return list(MAP())
def LIST1() : return list(MAP1())

def solve():
    N = INT()
    xbin = input()
    xdec = int(xbin, 2)
    m = xbin.count('1')

    a = xdec % (m+1)
    b = xdec % (m-1) if m > 1 else 0

    num = [0]*N
    for i in range(1, N):
        num[i] = num[i % bin(i).count('1')] + 1

    for i in range(N):
        if xbin[i] == '0':
            y = ( a + pow(2, N-i-1, m+1) ) % ( m+1 )
            print(num[y] + 1)
        elif m <= 1:
            print(0)
        else:
            y = ( b - pow(2, N-i-1, m-1) ) % ( m-1 )
            print(num[y] + 1)

if __name__ == '__main__':
    solve()
import sys

input = sys.stdin.readline
N, K = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N - 1)]
P = int(1e9+7)
kaizyo = [0]
kaizyo_inv = [0]
tmp = 1
for i in range(1, K+1):
    tmp = (tmp*i) % P
    kaizyo.append(tmp)
    kaizyo_inv.append(pow(tmp, P - 2, P))


def comb(n, r):
    if n < r or n < 0:
        return 0
    elif n == r or r == 0:
        return 1
    else:
        return kaizyo[n] * kaizyo_inv[r] * kaizyo_inv[n - r]


g=[[] for _ in range(N)]
for a, b in ab:
    g[a-1].append(b-1)
    g[b - 1].append(a - 1)

children = [[] for _ in range(N)]
q = [(0, None)]
while len(q) > 0:
    v, p = q.pop()
    for u in g[v]:
        if u != p:
            q.append((u, v))
            children[v].append(u)

ans = 1
ans *= K
ans = (ans * comb(K - 1, len(children[0]))*kaizyo[len(children[0])]) % P
q = [i for i in children[0]]
while len(q) > 0:
    v = q.pop()
    if len(children[v]) != 0:
        ans = (ans * comb(K - 2, len(children[v]))*kaizyo[len(children[v])]) % P
    q += children[v]
print(ans)


### FIXED CODE ###

import sys

input = sys.stdin.readline
N, K = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N - 1)]
P = int(1e9+7)
if N == 1:
    print(K % P)
    sys.exit(0)
kaizyo = [0]
kaizyo_inv = [0]
tmp = 1
for i in range(1, K+1):
    tmp = (tmp*i) % P
    kaizyo.append(tmp)
    kaizyo_inv.append(pow(tmp, P - 2, P))


def comb(n, r):
    if n < r or n < 0:
        return 0
    elif n == r or r == 0:
        return 1
    else:
        return kaizyo[n] * kaizyo_inv[r] * kaizyo_inv[n - r]


g=[[] for _ in range(N)]
for a, b in ab:
    g[a-1].append(b-1)
    g[b - 1].append(a - 1)

children = [[] for _ in range(N)]
q = [(0, None)]
while len(q) > 0:
    v, p = q.pop()
    for u in g[v]:
        if u != p:
            q.append((u, v))
            children[v].append(u)

if len(children[0]) > K - 1:
    print(0)
    sys.exit()
ans = 1
ans *= K
n_child = len(children[0])
ans = (ans * comb(K - 1, n_child)*kaizyo[n_child]) % P
q = [i for i in children[0]]
while len(q) > 0:
    v = q.pop()
    n_child = len(children[v])
    if n_child > K - 2:
        print(0)
        sys.exit()
    if n_child != 0:
        ans = (ans * comb(K - 2, n_child)*kaizyo[n_child]) % P
    q += children[v]
print(ans)
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))

n = Ii()
a = Li()
sa = sum(a)
af = [0]*(10**5)
for i in a: 
  af[i]+=1
q = Ii()
for i in range(q):
  b,c = Mi()
  sa = sa + (c-b)*af[b]
  af[c] += af[b]
  af[b] = 0;
  print(sa)

### FIXED CODE ###

import sys
n = int(input())
a = list(map(int,sys.stdin.readline().split()))
q = int(input())
s = sum(a)
cnt = [0]*(10**5+5)
for c in a:
  cnt[c] +=1
for i in range(q):
  b,c = map(int,sys.stdin.readline().split())
  bdif = c-b
  s += cnt[b]*bdif
  cnt[c] += cnt[b]
  cnt[b] = 0
  print(s)
n,m,x=map(int,input().split())
s=sum(int(i)<x for i in input().split())
print(min(s,m-s))

### FIXED CODE ###

a,b,x = map(int,input().split())
print('YES' if a <= x <= (a+b) else 'NO')
X = int(input())
X_ = X
x_sum = 0
while True:
    if (X_ // 10) ==0 :
        break
    else:
        x_sum += X_ % 10
        X_ = X_ // 10
if X % x_sum == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

X = int(input())
X_ = X
x_sum = 0
while True:
    x_sum += X_ % 10
    if (X_ // 10) ==0 :
        break
    else:
        X_ = X_ // 10
if X % x_sum == 0:
    print("Yes")
else:
    print("No")
inputA,inputB =map(input())

print(inputB.count('ABC'))

### FIXED CODE ###

inputA= int(input())
inputB =input()

print(inputB.count('ABC'))
import heapq


class Dijkstra:
    def dijkstra(self, adj, start, goal=None):

        num = len(adj)  # グラフのノード数
        dist = [float('inf') for i in range(num)]  # 始点から各頂点までの最短距離を格納する
        prev = [float('inf') for i in range(num)]  # 最短経路における，その頂点の前の頂点のIDを格納する

        dist[start] = 0
        q = []  # プライオリティキュー．各要素は，(startからある頂点vまでの仮の距離, 頂点vのID)からなるタプル
        heapq.heappush(q, (0, start))  # 始点をpush

        while len(q) != 0:
            prov_cost, src = heapq.heappop(q)  # pop

            # プライオリティキューに格納されている最短距離が，現在計算できている最短距離より大きければ，distの更新をする必要はない
            if dist[src] < prov_cost:
                continue

            # 他の頂点の探索
            for dest in range(num):
                cost = adj[src][dest]
                if cost != float('inf') and dist[dest] > dist[src] + cost:
                    dist[dest] = dist[src] + cost  # distの更新
                    heapq.heappush(q, (dist[dest], dest))  # キューに新たな仮の距離の情報をpush
                    prev[dest] = src  # 前の頂点を記録

        if goal is not None:
            return self.get_path(goal, prev)
        else:
            return dist

    def get_path(self, goal, prev):
        '''
        始点startから終点goalまでの最短経路を求める
        '''
        path = [goal]  # 最短経路
        dest = goal

        # 終点から最短経路を逆順に辿る
        while prev[dest] != float('inf'):
            path.append(prev[dest])
            dest = prev[dest]

        # 経路をreverseして出力
        return list(reversed(path))

from collections import defaultdict
Ey = defaultdict(lambda: defaultdict(lambda: float("inf")))
Es = defaultdict(lambda: defaultdict(lambda: float("inf")))


N, M, S, T = map(int, input().split())
E = [list(map(int, input().split())) for i in range(M)]

for e in E:
    u, v, a, b = e
    Ey[u-1][v-1] = Ey[v-1][u-1] = a
    Es[u-1][v-1] = Es[v-1][u-1] = b

dj = Dijkstra()
Dy = dj.dijkstra(Ey, S-1)
Ds = dj.dijkstra(Es, T-1)
mi = float("inf")
Ans = [0] * N
for i in range(N-1, -1, -1):
    mi = min(mi, Dy[i]+Ds[i])
    Ans[i] = mi
for a in Ans:
    print(10**15-a)


### FIXED CODE ###

n, m, d = map(int, input().split())
print((m-1) * ((n-d)*2 if d!=0 else n) / (n*n))
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort()
if K > 0:
  for i in range(K):
    H.pop(-1)
print(sum(H))

### FIXED CODE ###

N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort()
if K> 0:
    del H[-K:]
print(sum(H))
A = int(input())

for i in range(2,A):
  if (A % i == 0):
    a = i
    break

b = A / a
print(int(a+b-2))
    

### FIXED CODE ###

import math
n = int(input())
n_s = int(math.sqrt(n))
for i in range(1, n_s+1):
    if n % i == 0:
        a = i
        b = n / i
        
print(int(a + b - 2))
N = input()
tip = "No"
if (N[0] == 7) or (N[1] == 7) or (N[2] == 7):
  tip = "Yes"
print(tip)

### FIXED CODE ###

N = int(input())

x = N // 3
y = N // 5
z = N // 15

p = N * (N + 1) / 2
q = 3 * x * (x + 1) / 2
r = 5 * y * (y + 1) / 2
s = 15 * z * (z + 1) / 2
Sum = p - q - r + s
print(int(Sum))
import sympy

A,B,K = map(int, input().split())


C = sympy.gcd(A,B)

y = []
for i in range(C):
    if C % (i+1) == 0:
        y.append(i+1)


print(y[::-1][K-1])

### FIXED CODE ###

A,B,K = map(int, input().split())

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)


C = gcd(A,B)

y = []
for i in range(C):
    if C % (i+1) == 0:
        y.append(i+1)


print(y[::-1][K-1])
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
t = sum(b)
ans = 0
j = m

for i in range(n+1):
    while j > 0 and t>k:
        j -= 1
        t -= b[j]
    if t>k: break
    ans = max(ans, i+j)
    #if i==n: break
    t += a[i]

print(ans)

### FIXED CODE ###

n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
t = sum(b)
ans = 0
j = m

for i in range(n+1):
    while j > 0 and t>k:
        j -= 1
        t -= b[j]
    if t>k: break
    ans = max(ans, i+j)
    if i==n: break
    t += a[i]

print(ans)
HW = input().split()
hw = input().split
print((HW[0]-hw[0])*(HW[1]-hw[1]))

### FIXED CODE ###

HW = list(map(int, input().split()))
hw = list(map(int, input().split()))
a = (HW[0]-hw[0])*(HW[1]-hw[1])
print(a)
def lcs():
???x = raw_input()
  y = raw_input()
???x_len = len(x)
  y_len = len(y)
  z2 = [0 for i in range(y_len+1)]

???for i in range(x_len):
   z1 = z2 + []
   ele = x[i]
   for k in range(y_len):
      if x[i] == y[k]:
         z1[k+1] = z2[k] + 1
      elif z1[k+1] < z1[k]:???
?????????   z1[k+1] = z1[k]

  return z1[-1]

num = input()
for l in range(num):
  print lcs()

### FIXED CODE ###

def lcs():
  x = raw_input()
  y = raw_input()
  x_len = len(x)
  y_len = len(y)
  z2 = [0 for i in range(y_len+1)]

  for i in range(x_len):
    z1 = z2 + []
    ele = x[i]
    for k in range(y_len):
      if ele == y[k]:
        z2[k+1] = z1[k] + 1
      elif z2[k+1] < z2[k]:
        z2[k+1] = z2[k]

  return z2[-1]

num = input()
for j in range(num):
  print lcs()
r = input()
print(r*r)

### FIXED CODE ###

r = int(input())
print(r*r)
tmp=input().split()
n=int(tmp[0])
d=int(tmp[1])
xn = [0]*d
num = 0

for i in range(n):
  xn[i] = input().split()
    
for i in range(n):
  for j in range(i+1, n):
    dist = 0
    for k in range(d):
      dist = dist + pow(int(xn[i][k])-int(xn[j][k]), 2)
#    print("test",dist)
#    print(int(pow(int(pow(dist,0.5)), 2)))
    if dist == int(pow(int(pow(dist,0.5)), 2)):
      num += 1
print(num)
                
    

### FIXED CODE ###

tmp=input().split()
n=int(tmp[0])
d=int(tmp[1])
xn = [0]*n
num = 0

for i in range(n):
  xn[i] = input().split()
    
for i in range(n):
  for j in range(i+1, n):
    dist = 0
    for k in range(d):
      dist = dist + pow(int(xn[i][k])-int(xn[j][k]), 2)
#    print("test",dist)
#    print(int(pow(int(pow(dist,0.5)), 2)))
    if dist == int(pow(int(pow(dist,0.5)), 2)):
      num += 1
print(num)
def solve(c,h,w,count):
	if 0 <= h < H and 0 <= w < W:
		if c in "#@*" and c == A[h][w]:
			A[h][w] = count
			solve(c,h+1,w,count)
			solve(c,h-1,w,count)
			solve(c,h,w+1,count)
			solve(c,h,w-1,count)
while 1:
	H,W = map(int,raw_input().split())
	if H == W == 0:
		break
	A = [list(raw_input()) for i in range(H)]
	count = 0
	for h in range(H):
		for w in range(W):
			if str(A[h][w]) in "#@*":
				solve(A[h][w],h ,w,count)
				count += 1
	print count

### FIXED CODE ###

import sys
sys.setrecursionlimit(20000)
def solve(h,w,count,c):
    if 0 <= h < H and 0 <= w < W and A[h][w] == c:
        A[h][w] = count
        for dh,dw in zip([1,0,-1,0],[0,1,0,-1]):
            solve(h+dh,w+dw,count,c)
while 1:
    H,W = map(int,raw_input().split())
    if H == W == 0: break
    A = [list(raw_input()) for _ in range(H)]
    count = 0
    for h in range(H):
        for w in range(W):
            if type(A[h][w]) is not int:
                solve(h,w,count,A[h][w])
                count += 1
    print count
n = int(input())
dataset = [input().replace("Hoshino", "Hoshina") for _ in range(n)]
print(*dataset, sep="\n")



### FIXED CODE ###

n = int(input())
dataset = [input().replace("Hoshino", "Hoshina") for _ in range(n)]
print(*dataset, sep="\n")