Harryxun/stf_run huggingface dataset:
import collections
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
b=collections.Counter(a)
d=list(b.items())
d.sort(lambda x:-x[1])
if d[0][1]==1:
  for i in range(n):
    if a[i]==int(d[0][0]):
      print(int(d[1][0]))
    else:
      print(int(d[0][0]))
else:
  for i in range(n):
    print(int(d[0][0]))
    
          


### FIXED CODE ###

import collections
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
b=collections.Counter(a)
d=list(b.items())
d.sort(key=lambda x:-int(x[0]))
if d[0][1]==1:
  for i in range(n):
    if a[i]==int(d[0][0]):
      print(int(d[1][0]))
    else:
      print(int(d[0][0]))
else:
  for i in range(n):
    print(int(d[0][0]))
import math

def round(R):
  return 2*R*pi

round(R)

### FIXED CODE ###

import math
 
def round(R):
  return 2*R*math.pi
 
R = int(input())
print(round(R))
import functions
from functools import reduce

K=int(input())

ans=K*(1+K)/2
for i in range(1, K+1):
    for j in range(i+1, K+1):
        ans+=functions.gcd(i,j)*6
        for k in range(j+1,K+1):
            ans+=reduce(functions.gcd, [i,j,k])*6
print(str(int(ans)))

### FIXED CODE ###

import math
from functools import reduce

K=int(input())

ans=K*(1+K)/2
for i in range(1, K+1):
    for j in range(i+1, K+1):
        ans+=math.gcd(i,j)*6
        for k in range(j+1,K+1):
            ans+=reduce(math.gcd, [i,j,k])*6
print(str(int(ans)))
"""
https://atcoder.jp/contests/dp/tasks/dp_j
"""
from sys import stdin
from collections import defaultdict
input = stdin.readline

n = int(input())
c = [0] * 4
l = list(map(int, input().split()))

for i in l:
    c[i] += 1

# dp = defaultdict(int)
# dp[(0, 0, 0)] = 0
dp = [[[0] * (302) for i in range(302)] for j in range(302)]
# dp[0][0][0] = 0
for n3 in range(0, c[3] + 1):
    for n2 in range(0, c[2] + c[3] - n3 + 1):
        for n1 in range(0, n - c[0] - n2 - n3 + 1):
            if n1 or n2 or n3:
                dp[n1 + 1][n2 + 1][
                    n3 + 1] = (n + n1 * dp[n1][n2 + 1][n3 + 1] +
                               n2 * dp[n1 + 2][n2][n3 + 1] +
                               n3 * dp[n1 + 1][n2 + 2][n3]) / (n1 + n2 + n3)

print(dp[c[1] + 1][c[2] + 1][c[3] + 1])

### FIXED CODE ###

"""
https://atcoder.jp/contests/dp/tasks/dp_j
"""
from sys import stdin
input = stdin.readline

n = int(input())
c = [0] * 4
l = list(map(int, input().split()))

for i in l:
    c[i] += 1

dp = [[[0.0] * (n + 1) for i in range(n + 1)] for j in range(n + 1)]
dp[0][0][0] = 0
for n3 in range(0, c[3] + 1):
    for n2 in range(0, c[2] + c[3] - n3 + 1):
        for n1 in range(0, n-c[0]- n3 - n2 + 1):
            if n1 == n2 == n3 == 0:
                continue
            temp = n
            if n1 != 0:
                # temp += n1 * dp[(n1 - 1, n2, n3)]
                temp += n1*dp[n1 - 1][n2][n3]
            if n2 != 0:
                # temp += n2 * dp[(n1 + 1, n2 - 1, n3)]
                temp += n2*dp[n1 + 1][n2 - 1][n3]
            if n3 != 0:
                # temp += n3 * dp[(n1, n2 + 1, n3 - 1)]
                temp += n3*dp[n1][n2 + 1][n3 - 1]
            dp[n1][n2][n3] = temp / (n1 + n2 + n3)

print(dp[c[1]][c[2]][c[3]])
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<k:
  print('Yay!')
  else
  print(':(')


### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
  print('Yay!')
else:
  print(':(')
import math
x_1,y_1,x_2,y_2 = map(int,input().split())
print(math.sqrt((x_1-x_2)**2+(y_1-y_2)**2))


### FIXED CODE ###

import math
x_1,y_1,x_2,y_2 = map(float,input().split())
print(math.sqrt((x_1-x_2)**2+(y_1-y_2)**2))
import math
n, x = map(int,input().split())
x_list = list(map(int,input().split()))
x_list.append(x)
x_list.sort()
dis_list = []
for i in range(n):
    dis_list.append(x_list[i+1]-x_list[i])

print(ans)

### FIXED CODE ###

from fractions import gcd

n, x = map(int,input().split())
x_list = list(map(int,input().split()))
x_list.append(x)
x_list.sort()
dis_list = []

for i in range(n):
    dis_list.append(x_list[i+1] - x_list[i])

ans = dis_list[0]
for i in range(n):
    ans = gcd(dis_list[i],ans)

print(ans)
lst = input()

lst[0] = int(lst[0])
n = lst[0]
s = lst[1]

if n % 2 == 1:
    print('NO')

t = ''

for i in range(0, n//2):
    t += s[i]

if t + t == s:
    print('YES')
else:
    print('NO')


### FIXED CODE ###

lst = [input() for i in range(2)]

n = int(lst[0])
s = lst[1]
t = ''

for i in range(n//2):
    t += s[i]

if n % 2 == 1:
    print('No')
elif t + t == s:
    print('Yes')
else:
    print('No')
def f(n):
    if memo[n] > 0:
        return memo[n]
    memo[n] = f(n - 1) + f(n - 2)
    return memo[n]


N, M, *A = map(int, open(0).read().split())
memo = [1, 1] + [-1] * (N + 10)
A = list(A) + [N + 1]
MOD = 10 ** 9 + 7
ans = 1
prev = 0
for a in A:
    if a == prev:
        ans = 0
        break
    ans *= f(a - 1 - prev)
    ans %= MOD
    prev = a + 1
print(ans)


### FIXED CODE ###

import sys


sys.setrecursionlimit(10 ** 6)


def f(n):
    if memo[n] > 0:
        return memo[n]
    memo[n] = f(n - 1) + f(n - 2)
    return memo[n]


N, M, *A = map(int, open(0).read().split())
memo = [1, 1] + [-1] * N
A = list(A) + [N + 1]
MOD = 10 ** 9 + 7
ans = 1
prev = 0
for a in A:
    if a == prev:
        ans = 0
        break
    ans *= f(a - 1 - prev)
    ans %= MOD
    prev = a + 1
print(ans)
import math

def solve():
    A, B = map(int, input().split())

    C = math.gcd(A,B) 
    

    cnt = 1
    primeNum = []
    for i in range(3, C + 1, 2):
        if A % i == 0 and B % i == 0:
            if isPrime(i, primeNum):
                primeNum.append(i)
                cnt += 1

    if A % 2 == 0 and B % 2 == 0:
        cnt += 1

    if A == B:
        cnt += 1
    
    print(cnt)
        

def isPrime(num, primeNum):
    for n in primeNum:
        if n > math.sqrt(num):
            break 
        if num % n == 0:
            return False
        
    return True


if __name__ == '__main__':
    solve()


### FIXED CODE ###

def solve():
    A, B = map(int, input().split())

    primeFactorA = prime_factorize(A)
    primeFactorB = prime_factorize(B)

    commonFactor = [1]
    for f in primeFactorB:
        if f in primeFactorA:
            commonFactor.append(f)
    
    print(len(commonFactor))


def prime_factorize(num):
    a = set() 
    while num % 2 == 0:
        a.add(2)
        num //= 2
    
    f = 3
    while f * f <= num:
        if num % f == 0:
            a.add(f)
            num //= f
        else:
            f += 2
    if num != 1:
        a.add(num)
    
    return a

if __name__ == '__main__':
    solve()
d={}
n,m = map(int,input().split())
for _ in range(m):
    i,j = map(int,input().split())
    if j in d:
        d[j].append(i)
    else:
        d[j]=[i]
flag=0
if n in d:
    for item in d[n]:
        if item in d and 1 in d[item]:
            flag=1
            break
print('POSSIBLE' if flag else 'IMPOSSIBLE')


### FIXED CODE ###

print('ABC'+input())
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[i+N-K-1]-H[i])

print(ans)

### FIXED CODE ###

N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[K-N+i-1]-H[i])

print(ans)
ab = sorted(ab, key= lambda x:(x[0]))

from heapq import heappush,heappop

n,m = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(n)]

hq = []
j = 0
ans = 0

for i in range(m):
  while j<n and ab[j][0] <= i+1:
    heappush(hq,-ab[j][1])
    j+=1
  if len(hq)>0:
    ans += -heappop(hq)
    
print(ans)    

### FIXED CODE ###

from heapq import heappush,heappop

n,m = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(n)]
ab = sorted(ab, key= lambda x:(x[0]))

hq = []
j = 0
ans = 0

for i in range(m):
  while j<n and ab[j][0] <= i+1:
    heappush(hq,-ab[j][1])
    j+=1
  if len(hq)>0:
    ans += -heappop(hq)
    
print(ans)
def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    BC = []

    D = []
    for i in range(M):
        b, c = map(int, input().split())
        BC.append((b, c))
    BC.sort(key=lambda x: x[1], reverse=True)
    ld = 0
    for b, c in BC:
        D += [c] * b
        ld += b
        if ld > N:
            break
    
    res = 0
    A.sort()
    for i in range(N):
        res += max(A[i], D[i])
        

    res = 0
    for i in range(N):
        if i < ld:
            res += max(A[i], D[i])
        else:
            res += A[i]
    

    print(res)

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    BC = []

    D = []
    for i in range(M):
        b, c = map(int, input().split())
        BC.append((b, c))
    BC.sort(key=lambda x: x[1], reverse=True)
    ld = 0
    for b, c in BC:
        D += [c] * b
        ld += b
        if ld > N:
            break
    
    res = 0
    A.sort()
    for i in range(N):
        if i < ld:
            res += max(A[i], D[i])
        else:
            res += A[i]
    

    print(res)

if __name__ == "__main__":
    main()
r = (int)raw_input()

s = 3.14*r*r
l = 2.0*3.14*r

print s, l

### FIXED CODE ###

import math

r = float(input())

s = math.pi * r**2
l = 2.0*math.pi*r

print(s, l)
A,B,C = map(float,input().split())


if math.sqrt(A)+math.sqrt(B)<math.sqrt(C):
    print("YES")
else:
    print("NO")
    

### FIXED CODE ###

import math

from decimal import Decimal

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

a = Decimal(A).sqrt()
b = Decimal(B).sqrt()
c = Decimal(C).sqrt()


#if math.sqrt(A)+math.sqrt(B)<math.sqrt(C):
if a+b<c:
    print("Yes")
else:
    print("No")
import math
def aPb(a,b):return(math.factorial(a)//math.factorial(a-b))
def aCb(a,b):return(aPb(a,b)//math.factorial(b))
def ex(X):
  b=X[:]
  b.append("null")
  a=[]
  for i in range(len(X)):
    if b[i]!=b[i+1]:a.append(b[i])
  return a
n,a=int(input()),list(map(int,input().split()));b=[0]
for i in a:b.append(b[-1]+i)
b.sort();d=ex(b)
c=0;ans=0
for i in d:ans+=aCb(b.count(i),2)
print(ans)

### FIXED CODE ###

n,a=int(input()),list(map(int,input().split()));b=[0]
for i in range(n):b.append(b[i]+a[i])
b.sort();c=1;ans=0
for i in range(n):
  if b[i]==b[i+1]:c+=1
  else:
    if c>=2:ans+=(c*(c-1))//2
    c=1
if c>=2:ans+=(c*(c-1))//2
print(ans)
K = input()
S = input()
if len(K) > len(S):
  print(S)
else:
  strings = S[:K + 1]
  print(strings)

### FIXED CODE ###

K = int(input())
S = input()
strings = ''
if K >= len(S):
  print(S)
else:
  strings = str(S[:K]) + '...'
  print(strings)
y=list(map(int,x))
a=y[0]
b=y[1]
c=y[2]
d=sorted([a,b,c])
print("{0} {1} {2}".format(d[0],d[1],d[2]))    

### FIXED CODE ###

list=input().split()
list=sorted(list)
print(list[0],list[1],list[2])
N = int(input())
a = list(map(int, input().split()))
p = [t for t in a if t >= 0]
m = [t for t in a if t < 0]
p.sort(reverse = True)
m.sort()
l = []
#print(a)
if len(p) == 0:
  u = m.pop()
  v = m.pop()
  l.append((u, v))
  p.append(u - v)
if len(m) == 0 and len(p) >= 2:
  u = p.pop()
  v = p.pop()
  l.append((u, v))
  m.append(u - v)
while len(p) >= 2:
  u = m.pop()
  v = p.pop()
  l.append((u, v))
  m.append(u - v)
while len(m):
  t = p[0]
  u = m.pop()
  l.append((t, u))
  p[0] = t - u
print(p[0])
for res in l:
  print(*res)

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
p = [t for t in a if t >= 0]
m = [t for t in a if t < 0]
p.sort(reverse = True)
m.sort()
l = []
if N == 2:
  print(max(a) - min(a))
  print(max(a), min(a))
  exit(0)
if len(p) == 0:
  u = m.pop()
  v = m.pop()
  l.append((u, v))
  p.append(u - v)
if len(m) == 0 and len(p) >= 2:
  u = p.pop()
  v = p.pop()
  l.append((u, v))
  m.append(u - v)
while len(p) >= 2:
  u = m.pop()
  v = p.pop()
  l.append((u, v))
  m.append(u - v)
while len(m):
  t = p[0]
  u = m.pop()
  l.append((t, u))
  p[0] = t - u
print(p[0])
for res in l:
  print(*res)
from collections import defaultdict

mod = 10 ** 9 + 7


def cmb(n, r):
    if n < r:
        return 0  # <-直した
    if r > n - r:
        return cmb(n, n - r)
    if r == 0:
        return 1
    if r == 1:
        return n
    res = f[n]
    res *= invs[r]
    res %= mod
    res *= invs[n - r]
    res %= mod
    return res


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

x = M
i = 2
while i * i <= M:
    t = 0
    while x % i == 0:
        x //= i
        t += 1
    if t > 0:
        d[i] = t
    i += 1
if x > 1:
    d[x] = 1

max_v = max(d.values())

f = [-1] * (N - 1 + max_v + 1)
f[0] = 1
t = 1
for i in range(1, N - 1 + max_v + 1):
    t *= i
    t %= mod
    f[i] = t

# print(d)

inv = pow(t, mod - 2, mod)
invs = [-1] * (N - 1 + max_v + 1)
invs[N - 1 + max_v] = inv
for i in range(N - 1 + max_v - 1, 0, -1):
    inv *= (i + 1)  # <-直した
    inv %= mod
    invs[i] = inv

ans = 1
for cnt in d.values():
    ans *= cmb(N - 1 + cnt, cnt)
    ans %= mod
print(ans)


### FIXED CODE ###

MOD = 10 ** 9 + 7


def prime_factorization(n):
    i = 2
    res = []
    while i * i <= n:
        cnt = 0
        while n % i == 0:
            n /= i
            cnt += 1
        if cnt > 0:
            res.append(cnt)
        i += 1
    if n > 1:
        res.append(1)
    return res


def comb(a, b):
    b = min(b, a - b)
    if b < 0:
        return 0
    elif b == 0:
        return 1
    elif b == 1:
        return a
    else:
        return (a % MOD) * pow(b, MOD - 2, MOD) % MOD * comb(a - 1, b - 1) % MOD


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

ans = 1
for power in prime_factorization(M):
    ans *= comb(N - 1 + power, power)
    ans %= MOD

print(ans)
from math import *
m=1000000
r_=m*float(input())
S=(pi*r_**2)/(m**2)
l=(2*pi*r)/m
print S,
print l

### FIXED CODE ###

from math import pi
from decimal import Decimal
r=Decimal(str(input()))
p=Decimal(str(pi))
print(str(p*r**2)+" "+str(2*p*r))
n=int(input())
b=list(map(int,input().split()))
s_b=sorted(list(set(b)),reverse=True)
ans=[]
for itr in range(n):
  for j in s_b:
    if len(b)>=j:
      if b[j-1]==j:
        b=b[:j-1]+b[j:]
        ans.append(j)
        break
    if j==1:
      print(-1)
      exit()
for i in range(n):
  print(ans[i])


### FIXED CODE ###

n=int(input())
b=list(map(int,input().split()))
s_b=sorted(list(set(b)),reverse=True)
if 1 not in s_b:
  print(-1)
  exit()
ans=[]
for itr in range(n):
  for j in s_b:
    if len(b)>=j:
      if b[j-1]==j:
        b.pop(j-1)
        ans.append(j)
        break
    if j==1:
      print(-1)
      exit()
ans.reverse()
for i in range(n):
  print(ans[i])
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
x = [False]*N
n,i = (1, 0)
while x[n-1] == False:
    x[n] = True
    n = a[n-1]
    i+=1
    if n==2:
        print(i)
        break
else:
    print(-1)

### FIXED CODE ###

N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
x = [False]*N
n,i = (0, 0)
while x[n] == False:
    x[n] = True
    n = a[n]-1
    i+=1
    if n==1:
        print(i)
        break
else:
    print(-1)
n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r - 100:(10-n))

### FIXED CODE ###

n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r + 100*(10-n))
n = int(input())
ans = ''
for i in range(1, 99):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += chr(ord('a') + N % 26)
      N //= 26
    break
  else:
    N -= 26 ** i
print(ans[::-1]) 

### FIXED CODE ###

N = int(input())
ans = ''
for i in range(1, 99):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += chr(ord('a') + N % 26)
      N //= 26
    break
  else:
    N -= 26 ** i
print(ans[::-1])
n=int(input())
a = [int(i) for i in input().split()] 
A=0
B=0
C=0
k=0
for i in range(n):
  if i%2==0:
    k=max(a)
    A += k
    del a(a.index(k))
  else :
    k=max(a)      
    B += k
    del a(a.index(k))   
  
C=A-B          
print(C)          

### FIXED CODE ###

n=int(input())
a = [int(i) for i in input().split()] 
A=0
B=0
C=0
k=0
for i in range(n):
  if i%2==0:
    k=max(a)
    A += k
    del a[a.index(k)]
  else :
    k=max(a)      
    B += k
    del a[a.index(k)]   
  
C=A-B          
print(C)
z = list(map(int, input().split()))
x = z[0]
if z[1] == 0:
  print(z[0])
else:
  p = list(map(int, input().split()))
  count = 0
  l = []
  for i in range(-100, 101):
    l.append(i)
  for i in p:
    l.remove(i)
  t = 200
  for i in l:
    e = abs(x-i)
    if e >= t:
      break
    t = e
    ans = i
  print(ans)

### FIXED CODE ###

z = list(map(int, input().split()))
x = z[0]
if z[1] == 0:
  print(x)
else:
  p = list(map(int, input().split()))
  l = []
  for i in range(-1, 102):
    l.append(i)
  for i in p:
    l.remove(i)
  t = 200
  for i in l:
    e = abs(x-i)
    if e >= t:
      break
    t = e
    ans = i
  print(ans)
from heapq import heappop, heappush

n, m = map(int, input().split())
a = []
for i in map(int, input().split()): heappush(a, i)

ans = []
for b, c in sorted([list(map(int, input().split()))for i in range(m)], key=lambda x:-x[1]):
        if len(a)==0: break
        for i in range(b): ans.append(max(c,  heappop(a)))
while len(a): ans.append(heappop(a))
print(sum(ans))

### FIXED CODE ###

from heapq import heappop, heappush

n, m = map(int, input().split())
a = []
for i in map(int, input().split()): heappush(a, i)

ans = []
for b, c in sorted([list(map(int, input().split()))for i in range(m)], key=lambda x:-x[1]):
        for i in range(b):
                if len(a)==0: break
                ans.append(max(c,  heappop(a)))
while len(a): ans.append(heappop(a))
print(sum(ans))
N, M = map(int, input().split())
work = [0] * N
for i in range(N):
    work[i] = [0] * 2
    work[i][1], work[i][0] = map(int, input().split())
ans = 0
work_money = sorted(work)
schedule = [0]*N
for j in range(N):
    day = M-work_money[N-1-j][1]
    while day >= 0:
        if schedule[day] == 0:
            schedule[day] += 1
            ans += work_money[N - 1 - j][0]
            break
        day -= 1
print(ans)


### FIXED CODE ###

import heapq
N, M = map(int, input().split())
work = [0] * N
for i in range(N):
    work[i] = [0] * 2
    a, b = map(int, input().split())
    if M-a >= 0:
        work[i][0], work[i][1] = a, -1 * b
    else:
        work[i][0], work[i][1] = 10**9, -1 * b
ans = 0
work_day = sorted(work)
index = 0
heap = []
heapq.heapify(heap)
for j in range(M+1):
    if index >= N:
        if len(heap) > 0:
            ans += heapq.heappop(heap)*(-1)
        continue
    while (work_day[index][0] <= j):
        heapq.heappush(heap, work_day[index][1])
        index += 1
        if index >= N:
            break
    if len(heap) > 0:
        ans += heapq.heappop(heap)*(-1)


print(ans)
A = int(input())
B = int(input())

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

### FIXED CODE ###


AB =  list(int(i) for i in input().split())

if AB[0] <= 8 and AB[1] <= 8:
    print("Yay!")
else:
    print(":(")
n = int(input())
table = list[i for i in range(n)]
print("{} {} {}".format(min(table),max(table),sum(table)))



### FIXED CODE ###

n = input()
table = list(map(int,input().split()))
print("{} {} {}".format(min(table),max(table),sum(table)))
import sys
input = sys.stdin.readline

N, W = [int(i) for i in input().split()]

def ans(N, W):
    d = [float("inf")] * N * 1000
    d[0] = 0
    V = 0

    for i in range(N):
        wi, vi = [int(i) for i in input().split()]
        V = V + vi

        for v in range(V, V-vi-1, -1):
            w_ = d[v - vi] + wi
            if w_ < d[v]:
                d[v] = w_

    for v in range(V, -1, -1):
        if d[v] <= W:
            return v

print(ans(N, W))


### FIXED CODE ###

import sys
input = sys.stdin.readline

N, W = [int(i) for i in input().split()]

def ans(N, W):
    d = [float("inf")] * (N * 1000 + 1)
    d[0] = 0
    V = 0

    for i in range(N):
        wi, vi = [int(i) for i in input().split()]
        V = V + vi

        for v in range(V, vi-1, -1):
            w_ = d[v - vi] + wi
            if w_ < d[v]:
                d[v] = w_

    for v in range(V, -1, -1):
        if d[v] <= W:
            return v

print(ans(N, W))
while(1):
    x = raw_input()
    x = x.split(" ")
    if(x == "0 ? 0"):
        break
    a = int(x[0])
    op = str(x[1])
    b = int(x[2])
    if(op == "+"):
        print a+b
    elif(op == "-"):
        print a-b
    elif(op == "*"):
        print a*b
    elif(op == "/"):
        print a/b



### FIXED CODE ###

while(1):
    x = raw_input()
    x = x.split(" ")
    a = int(x[0])
    op = str(x[1])
    b = int(x[2])
    if(op == "?"):
        break
    elif(op == "+"):
        print a+b
    elif(op == "-"):
        print a-b
    elif(op == "*"):
        print a*b
    elif(op == "/"):
        print a/b
h, w = list(map(int, input().split()))
field = []
for i in range(h):
    si = input()
    field.append( [c for c in si] )

def visalizer():
    global field
    print("=========================")
    for i in range(h):
        for j in range(w):
            print(field[i][j], end=' ')
        print('\n')
    print("=========================")

def maeke_last(c):
    if c == "#":
        return "."
    else:
        return "#"

pair_list = []
dx = [0, 0, -1, 1]
dy = [1, -1, 0, 0]
def dfs( last, s_row=0, s_colmun=0, row=0, column=0,):
    global field
    global dict
    if not((0 <= row and row <=h-1) and (0 <=column and column <= w-1)):
        return
    if field[row][column] == '@':
        return

    here = field[row][column]

    if here == last:
        return
    else:
        if not ((s_row, s_colmun) ,(row, column)) in pair_list:
            if here == '.':
                pair_list.append(((s_row, s_colmun) ,(row, column)))


    here_was = field[row][column]
    field[row][column] = '@'
    # visalizer()
    for i in range(len(dx)):
        n_row = row + dx[i]
        n_column = column + dy[i]
        dfs(last = here, s_row = s_row, s_colmun=s_colmun, row=n_row, column=n_column)
    field[row][column] = here_was

# for s_row in range(h):
#     for s_column in range(w):
#         dfs(last = field[s_row][s_column],  s_row=s_row, s_colmun=s_column, row=s_row, column=s_column)

for s_row in range(h):
    for s_column in range(w):
        if field[s_row][s_column] == "#":
            dfs(last = maeke_last(field[s_row][s_column]),  s_row=s_row, s_colmun=s_column, row=s_row, column=s_column)

for ele in pair_list:
    if ele[0]==ele[1] :
        pair_list.remove(ele)
    # pair_list.remove((ele[1], ele[0]))

pair_list2 = []
# for ele in pair_list:
#     if (not (ele[1], ele[0]) in pair_list2) :
#         pair_list2.append(ele)

# for ele in pair_list2:
#     print(ele)
print(len(pair_list))


# visalizer()



### FIXED CODE ###

n = int(input())
h = int(input())
w = int(input())


ans = (n - h+1)*(n-w+1)

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

if a==b+c:
  print(b)
elif b==0:
  print(0)
else:
  print(a-c+b)

### FIXED CODE ###

S,a,b=(int(x) for x in input().split())
ans = S//(a+b) * a
rem = S % (a+b )
ans +=min(rem,a)
print(ans)
import math

A, B = [int(i) for i in input().split()]

result = (A * B) // math.gcd(A, B)
print(result)

### FIXED CODE ###

import fractions 

A, B = [int(i) for i in input().split()]

result = A * B // fractions.gcd(A, B)
print(result)
import math

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

n_c = B//C - (A-1)//C
n_d = B//D - (A-1)//D
lcm_cd = C*D // math.gcd(C,D)
print(lcm_cd)
n_cd = B//lcm_cd - (A-1)//lcm_cd

print(B-A+1 - (n_c+n_d-n_cd))


### FIXED CODE ###

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

def gcd(a,b):
    while b:
        a,b = b,a%b
    return a

n_c = B//C - (A-1)//C
n_d = B//D - (A-1)//D
lcm_cd = C*D // gcd(C,D)
n_cd = B//lcm_cd - (A-1)//lcm_cd

print(B-A+1 - (n_c+n_d-n_cd))
D = input()
D = int(D)

if D == 25:
  print('Christmas')

else D <= 25:
  D = 25 - D
  print ('Christmas' + D * 'Eve')

### FIXED CODE ###

D = input()
D = int(D)

D = 25 - D

print ('Christmas' + ' Eve'* D)