Harryxun/stf_run huggingface dataset:
import collections

n = int(input())
s = [input() for _ in range(n)]
m = int(input())
t = [input() for _ in range(m)]

S = collections.Counter(s)
T = collections.Counter(t)

ans = [0]
for key, cont in S:
    if cont > T[key]:
        ans.append(cont - T[key])
print(max(ans))

### FIXED CODE ###

a, b, c = map(int, input().split())
if a+b < c:
    print("No")
else:
    print("Yes")
from math import factorial
a, b = map(int, input().split())
 
def count(x, y):
  a = factorial(x) / factorial(y) / factorial(x - y)
  return a
 
if(a+1== b):
  print(1)
else:
  count = 0
  for i in range(a-b+2):
    count += count(a,i+b)
  print(count)

### FIXED CODE ###

a, b = map(int, input().split())
mod = pow(10,9) + 7

def cal(a,i):
  min = i*(i-1)/2
  max = a*(a-1)/2 - (a-i)*(a-i-1)/2
  return max - min + 1

count = 0
for i in range(a-b+2):
  count += cal(a+1,i+b)
print(int(count % mod))
import itertools
s = input()
t = input()

A = itertools.combinations(list(range(len(t)+1)),2)
for i in A:
    part = t[i[0]:i[1]]
    print(part)
    if part in s:
        ans = len(part)
        
print(len(t) - ans)


### FIXED CODE ###

s= input()
t = input()

count = len(t)

for i in range(len(s) - len(t) + 1):
    str_ = s[i:i + len(t)]
    temp = 0
    for i in range(len(str_)):
        #print(str_[i])
        if str_[i] != t[i]:
            temp += 1
    count = min(count, temp)    
        
print(count)
import numpy as np
n = (int)(input())
s = []
t = []
for _ in range(n):
    a, b = (list)(map(int, input().split()))
    s.append(a)
    t.append(b)
mi = min(s)
ma = max(t)


def primeList(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2, N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum


def prime(s, t):
    primes = primeList(t)
    l = [0]*(t+1)
    c = 0
    s = 0
    for i in range(s, t+1):
        if i in primes and (i+1)//2 in primes:
            c += 1
        l[i] = c
    return l


primes = prime(mi, ma)
for i in range(n):
    print(primes[t[i]] - primes[s[i]-1])


### FIXED CODE ###

from itertools import accumulate

N = 100000
prime = [True]*(N+1)

prime[0] = prime[1] = False

for i in range(N+1):
    if prime[i]:
        for j in range(2*i, N+1, i):
            prime[j] = False

prime2 = [0] * (N+1)

for i in range(N+1):
    if prime[i] and prime[(i+1)//2]:
        prime2[i] = 1

acc = list(accumulate(prime2))

Q = int(input())
for _ in range(Q):
    l, r = map(int, input().split())
    print(acc[r]-acc[l-1])
a=int(input("Enter a"))
b=int(input("Enter b"))
c=int(input("Enter c"))
if a-b == b-c || b-a == c-b:
 print(Beautiful")
else:
 print("No")

### FIXED CODE ###

a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')
num_list = input()
key = 'keyence'

i = 0
ans =False
while num_list[i]==key[i]:
    i+=1
n = i
if n >= 6:
    print('YES')



i = -1
while num_list[i]==key[i]:
    i -= 1
    n += 1

if n >= 6:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

num_list = input()
key = 'keyence'
i = 0
l = len(num_list)

n = 0

while num_list[i]==key[i]:
    i+=1
    n +=1
    if n==7:
        print('YES')
        exit()

i = -1
while num_list[i]==key[i]:
    n += 1
    i -= 1
    if n==7:
        print('YES')
        exit()
print('NO')
def cf(x1,x2):
    cf=[]
    for i in range(2,min(x1,x2)+1):
        if x1 % i == 0 and x2 % i == 0:
            cf.append(i)
    return cf
 
cflist = cf(a,b)
 
import fractions
import itertools
 
for i in cflist:
        ans.append(i)
        for j in itertools.combinations(ans, 2):
                if 1 == fractions.gcd(j[0],j[1]):
            		pass
                else:
                        ans.pop()
                        break
 
print(len(ans))

### FIXED CODE ###

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

a, b = map(int, input().split())
import fractions
print(len(set(prime_decomposition(fractions.gcd(a,b))))+1)
a = int(input())

b = []

for i in a-1:
    b.append((input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res) 

### FIXED CODE ###

a = int(input())

b = []

for i in range(a):
    b.append(input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += float(i[0])*380000
    else:
        res += int(i[0])

print(res)
N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
  for i in range(0,int(N/2)):
    B+=[2*i,2*i]
    C+=[2*i+1,2*i+1]
  if A==B or A==C:
    ans=2**(N/2)
#    print(int(ans)%(10**9+7))
  else:
    print(0)
else:
  B+=[0]
  C+=[1]
  for i in range(0,int(N/2)):
    B+=[2*i+2,2*i+2]
    C+=[2*i+3,2*i+3]
  if A==B or A==C:
    ans=2**((N-1)/2)
#    print(int(ans)%(10**9+7))
  else: 
    print(0)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ

if N%2==0:
  for i in range(0,int(N/2)):
    B+=[2*i,2*i]
    C+=[2*i+1,2*i+1]
  if A==B or A==C:
    n=int(N/2)
    ans=2**n
    print(ans%(10**9+7))
  else:
    print(0)
else:
  B+=[0]
  C+=[1]
  for i in range(0,int(N/2)):
    B+=[2*i+2,2*i+2]
    C+=[2*i+3,2*i+3]
  if A==B or A==C:
    n=int((N-1)/2)
    ans=2**n
#    ans=2**((N-1)/2)
    print(ans%(10**9+7))
  else: 
    print(0)
from sys import stdin

#l = list(map(int, stdin.readline().rstrip().split()))
a,b,c,d,e = map(int, stdin.readline().rstrip().split())
#S = [list(map(int, stdin.readline().rstrip().split())) for _ in range(h)]#hの定義を忘れずに

if a==0:
  print('1')
elif b==0:
  print('2')
elif c==0:
  pront('3')
elif d==0:
  print('4')
elif e==0:
  print('5')


### FIXED CODE ###

from sys import stdin

#l = list(map(int, stdin.readline().rstrip().split()))
a,b,c,d,e = map(int, stdin.readline().rstrip().split())
#S = [list(map(int, stdin.readline().rstrip().split())) for _ in range(h)]#hの定義を忘れずに

if a==0:
  print('1')
elif b==0:
  print('2')
elif c==0:
  print('3')
elif d==0:
  print('4')
elif e==0:
  print('5')
n = int(input())
s = input()
if n%2==1:
  print("NO") 
elif s[0:n/2] == s[n/2]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n = int(input())
s = input()
if n%2==1:
    print("No") 
else:
    s1 = ""
    s2 = ""
    for i in range(0, n//2):
        s1+=s[i]
        s2+=s[n//2 + i]
    if(s1 == s2):
        print("Yes")
    else:
        print("No")
x = int(input())
    print(x*x*x)

### FIXED CODE ###

print(int(input())**3)
while 1:
   x, y = map(int, raw_input().split())
     if x == 0 and y == 0:
         break
     else:
         if x > y:
            print '%s %s' % (y,x)
         else:
            print '%s %s' % (x,y)
     

### FIXED CODE ###

while 1:
   x, y = map(int, raw_input().split())
   if x == 0 and y == 0:
      break
   elif x > y:
      print '%s %s' % (y,x)
   else:
      print '%s %s' % (x,y)
class nCrMod():
    def __init__(self, mod):
        self.mod = mod
        self.fac = [1, 1]
        self.finv = [1, 1]
        self.inv = [0, 1]

    def prep(self, n):
        mod = self.mod
        f, fi = self.fac[-1], self.finv[-1]
        for i in range(len(self.fac), n + 1):
            fn = f * i % mod
            v = -self.inv[mod % i] * (mod // i) % mod
            fin = fi * v % mod
            f, fi = fn, fin
            self.fac.append(f)
            self.finv.append(fi)
            self.inv.append(v)

    def __call__(self, n, r):
        if len(self.fac) <= n:
            self.prep(n)
        return self.fac[n] * self.finv[r] * self.finv[n - r] % self.mod

def main():
    mod = 10 ** 9 + 7
    nCr = nCrMod(mod)
    N, K = map(int, input().split())
    r = 0
    for i in range(1, K + 1):
        print(nCr(K - 1, i - 1) * nCr(N - K + 1, i) % mod)
main()


### FIXED CODE ###

class nCrMod():
    def __init__(self, mod):
        self.mod = mod
        self.fac = [1, 1]
        self.finv = [1, 1]
        self.inv = [0, 1]

    def prep(self, n):
        mod = self.mod
        f, fi = self.fac[-1], self.finv[-1]
        for i in range(len(self.fac), n + 1):
            fn = f * i % mod
            v = -self.inv[mod % i] * (mod // i) % mod
            fin = fi * v % mod
            f, fi = fn, fin
            self.fac.append(f)
            self.finv.append(fi)
            self.inv.append(v)

    def __call__(self, n, r):
        if len(self.fac) <= n:
            self.prep(n)
        return self.fac[n] * self.finv[r] * self.finv[n - r] % self.mod

def main():
    mod = 10 ** 9 + 7
    nCr = nCrMod(mod)
    N, K = map(int, input().split())
    r = 0
    for i in range(1, K + 1):
        if i - 1 > N - K:
            print(0)
            continue
        print(nCr(K - 1, i - 1) * nCr(N - K + 1, i) % mod)
main()
N = int(input())
L = list(map(int,input().split()))



ans = 0

for i in range(len(L)):
    for j in range(i+1,len(L)):
        for k in range(j+1,len(L)):
            #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
            if L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j] \
            and L[i] != L[j] and L[j] != L[k] and L[k] != L[i]:
                #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
                ans += 1

prinr(ans)

### FIXED CODE ###

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



ans = 0

for i in range(len(L)):
    for j in range(i+1,len(L)):
        for k in range(j+1,len(L)):
            #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
            if L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j] \
            and L[i] != L[j] and L[j] != L[k] and L[k] != L[i]:
                #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
                ans += 1

print(ans)
# Pyramid
n = int(input())
x, y, h = [], [], []
flag = True
ans_x, ans_y, ans_h = 0, 0, 0
for i in range(n):
    _x_, _y_, _h_ = map(int, input().split())
    if _h_ == 0:
        break
    x.append(_x_)
    y.append(_y_)
    h.append(_h_)
for cx in range(101):
    for cy in range(101):
        for j in range(n):
            h_ = h[j] + abs(x[j] - cx) + abs(y[j] - cy)
            if flag is True:
                flag = h_
            elif flag == h_:
                if j == n - 1:
                    ans_x, ans_y, ans_h = cx, cy, h_
                else:
                    pass
            else:
                flag = True
                break
print('{0} {1} {2}'.format(ans_x, ans_y, ans_h))


### FIXED CODE ###

# Pyramid
n = int(input())
data = []
h_ = 0
for i in range(n):
    data.append(list(map(int, input().split())))
data = sorted(data, key=lambda x: x[2], reverse=True)
for cx in range(101):
    for cy in range(101):
        for j in range(n):
            if j == 0:
                h_ = data[0][2] + abs(cx - data[0][0]) + abs(cy - data[0][1])
            else:
                if data[j][2] == max(0, h_ - abs(cx - data[j][0]) - abs(cy - data[j][1])):
                    if j == n - 1:
                        print('{0} {1} {2}'.format(cx, cy, h_))
                        exit()
                    else:
                        continue
                else:
                    break
import sys
input = sys.stdin.readline
import bisect
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
#print(A)
minA = A[0]
Query = []
for _ in range(m):
    b,c = map(int,input().split())
    if c > minA:
        Query.append([b,c])
Query = sorted(Query, key=lambda x:(x[1], x[0]), reverse=True)

ans = 0
for b,c in Query:
    #A.sort()
    if A[0] >= c:
        break
    else:
        index = min(bisect.bisect_left(A,c),b)
        if index > len(A):
            ans += c * len(A)
            break
        else:
            ans += c * index
            A = A[index:]
    #print(A)
print(ans + sum(A))

### FIXED CODE ###

import sys
input = sys.stdin.readline
import bisect
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort()

minA = A[0]
Query = []
for _ in range(m):
    b,c = map(int,input().split())
    if c > minA:
        Query.append([b,c])
Query = sorted(Query, key=lambda x:(x[1], x[0]), reverse=True)

ans = 0
index = 0
for b,c in Query:
    if index >= n:
        break
    #print("----")
    cnt = 0
    Flag = True
    while Flag:
        #print(A,b,c,index)
        if A[index] < c:
            A[index] = c
            cnt += 1
            index += 1
            if (cnt >= b) or (index >= n):
                Flag = False
        else:
            Flag = False
    '''
    #A.sort()
    if A[0] >= c:
        break
    else:
        index = min(bisect.bisect_left(A,c),b)
        if index > len(A):
            ans += c * len(A)
            break
        else:
            ans += c * index
            A = A[index:]
    print(A)
    '''
print(sum(A))
import math,functools
input()
A = [int(hoge) for hoge in input().split()]
print(functools.reduce(math.gcd,A))

### FIXED CODE ###

import fractions,functools
input()
A = [int(hoge) for hoge in input().split()]
print(functools.reduce(fractions.gcd,A))
a,b=int(input().split())

if b>2*a:
    c=b-2*a
    d=c//4
    print(a+d)
else:
    print(b//2)

### FIXED CODE ###

List=[int(j) for j in input().split()]
a=List[0]
b=List[1]

if b>2*a:
    c=b-2*a
    d=c//4
    print(a+d)
else:
    print(b//2)
N = int(input())
T, A = map(int, input().split())
diff =50000000
num = 0
for i in range(N):
    H = int(input())
    if abs(T - H*0.006) < diff:
        num = i + 1

### FIXED CODE ###

X, Y = map(int, input().split())
print(X + Y // 2)
import math
A,B,C,D=map(int,input().split())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


#print(len([x for x in range(A,B) if x%2!=0 and x%3!=0]))

size=B-A+1
C2=size//C

D2=size//D

cd=lcm(C,D)
cd=size//cd

Q=size-(C2+D2-cd)
print(Q)




### FIXED CODE ###

from fractions import gcd
A,B,C,D=map(int,input().split())


def lcm(x, y):
    return (x * y) // gcd(x, y)

size=B

cd=lcm(C,D)
allC=size//C
allD=size//D
allcd=size//cd
ALL=size-(allC+allD-allcd)

size=A-1
cd=lcm(C,D)
pC=size//C
pD=size//D
pcd=size//cd
P=size-(pC+pD-pcd)

print(ALL-P)
N,K = map(int,input().split())
A = input().split()
F = input().split()
for i in range(0,N):
    A[i] = int(A[i])
    F[i] = int(F[i])
A.sort()
F.sort(reverse=True)

B = [A[i] *F[i] for i in range(0,N)]
d = max(B)

def nex(x):
    count = 0
    for i in range(0,N):
        if x < B[i]:
            count += A[i] - int(x/F[i])
    return count

def target(l,r):
    if r - l == 1:
        if nex(l) <= K:
            return l
        else:
            return r
    elif nex(int((l+r)/2)) <= K:
         return target(l,int((l+r)/2))
    else:
        return target(int((l+r)/2),r)
    
ans = target(0,d)
print(ans)

### FIXED CODE ###

A,B = map(int,input().split())
if(A >= 10 or B >= 10):
    print(-1)
else:
    print(A * B)
print(x ** 3)

### FIXED CODE ###

x = int(input())
print(x**3)
N = int(input())
S = list(map(str, input()))
T = list(map(str, input()))

for i in range(N):
  print(S[i], end = "")
  print(T[i], end = "")

### FIXED CODE ###

N = int(input())
s, t = map(str, input().split())
S = list(map(str, s))
T = list(map(str, t))

for i in range(N):
	print(S[i], end = "")
	print(T[i], end = "")
from bisect import bisect_left, bisect_right
from typing import List
import collections
import bisect
import itertools
import functools
from fractions import gcd
import heapq
from math import ceil, sqrt, floor

import sys
sys.setrecursionlimit(50000)

import collections

from collections import defaultdict, deque
import collections

import bisect
import collections
from sortedcontainers import SortedList, SortedDict


H, W = list(map(int, input().split()))

areas = [ceil(H / 2), H // 2]

ret = areas[0] * (ceil(W / 2)) + areas[1] * (W // 2)

print(ret)



### FIXED CODE ###


from math import ceil, sqrt, floor


H, W = list(map(int, input().split()))

if H == 1 or W == 1:
    print(1)
    exit(0)

areas = [ceil(H / 2), H // 2]

ret = areas[0] * (ceil(W / 2)) + areas[1] * (W // 2)

print(ret)
A, B, K = map(int,input().split())
if(A>=K):
  print(A-K,B)
elif(B-K+A>=0):
  print(0,B-K+A)
else:
  print(0,0)


### FIXED CODE ###

S, T=input().split()
print(T+S)
# https://atcoder.jp/contests/abc138/tasks/abc138_d

from collections import deque
from collections import defaultdict
import sys
sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n, q = input_int_list()
    cnt = [0] * (n + 1)  # 1-indexed
    tree = defaultdict(list)
    depth = [0] * (n + 1)  # 1-indexed

    for _ in range(n - 1):
        a, b = input_int_list()
        tree[a].append(b)
        tree[b].append(a)

    dq = deque()

    dq.append((1, 0))  # node,depth
    visited = set([1])

    while dq:
        root, dep = dq.popleft()
        for node in tree[root]:
            if node not in visited:
                visited.add(node)
                depth[node] = dep + 1
                dq.append((node, dep + 1))

    def tree_walk(root, x):
        cnt[root] += x
        d = depth[root]
        for node in tree[root]:
            if node not in visited and d < depth[node]:
                visited.add(node)
                tree_walk(node, x)

    for _ in range(q):
        p, x = input_int_list()
        visited = set([p])
        tree_walk(p, x)

    print(*cnt[1:])
    return


if __name__ == "__main__":
    main()


### FIXED CODE ###

# https://atcoder.jp/contests/abc138/tasks/abc138_d

from collections import defaultdict
import sys
sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n, q = input_int_list()
    cnt = [0] * (n + 1)  # 1-indexed
    tree = defaultdict(list)

    for _ in range(n - 1):
        a, b = input_int_list()
        tree[a].append(b)
        tree[b].append(a)

    # 遅延評価をする O(q)
    for _ in range(q):
        p, x = input_int_list()
        cnt[p] += x

    # 遅延評価（DFS）O(n)
    stack = [(1, 0)]
    visited = set([1])
    while stack:
        e, add = stack.pop()
        cnt[e] += add
        for node in tree[e]:
            if node not in visited:
                visited.add(node)
                stack.append((node, cnt[e]))

    print(" ".join([str(i) for i in cnt[1:]]))
    return


if __name__ == "__main__":
    main()
l=map(str(),input.split())
c=l[0]*l[1]
if c%2==1:
  print('Odd')
else:
  print('Even')

### FIXED CODE ###

a, b=(int(i) for i in input().split())
c=a*b
if c%2==1:
  print('Odd')
else:
  print('Even')
n = list(map(int,input().split()))
l = list(map(int,input().split()))

length = 0;
answer = 1;
i = 0;

while (length + l[i]) <= n[1]:
    length = length + l[i]
    answer = answer + 1
    i = i + 1

if(answer <= n[0]):
    print(answer)
else:
    print(n[0])

### FIXED CODE ###

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

length = 0;
answer = 1;
i = 0;

while length + l[i] <= n[1]:
    length = length + l[i]
    answer = answer + 1
    if(len(l) == (i+1)):
        break;
    i = i + 1

#if(answer <= n[0]):
print(answer)
#else:
#    print(n[0])
x = list(input())
first = 10 * x[0] + x[1]
second = 10 * x[2] + x[3]


def mc(num):
    if 1 <= num <= 12:
        return True
    else:
        return False


def yc(num):
    if 1 <= num <= 99:
        return True
    else:
        return False


if yc(first):
    if mc(second):
        if yc(second):
            if mc(first):
                print("AMBIGUOUS")
            else:
                print("YYMM")
        else:
            print("YYMM")
    elif yc(second):
        if mc(first):
            print("MMYY")
        else:
            print("NA")
    else:
        pirnt("NA")
elif yc(second):
    if mc(first):
        print("MMYY")
    else:
        print("NA")
else:
    print("NA")

### FIXED CODE ###

x = list(input())
first = 10 * int(x[0]) + int(x[1])
second = 10 * int(x[2]) + int(x[3])


def mc(num):
    if 1 <= num <= 12:
        return True
    else:
        return False


def yc(num):
    if 0 <= num <= 99:
        return True
    else:
        return False


if yc(first):
    if mc(second):
        if yc(second):
            if mc(first):
                print("AMBIGUOUS")
            else:
                print("YYMM")
        else:
            print("YYMM")
    elif yc(second):
        if mc(first):
            print("MMYY")
        else:
            print("NA")
    else:
        print("NA")
elif yc(second):
    if mc(first):
        print("MMYY")
    else:
        print("NA")
else:
    print("NA")
input()
S = input()
cnt = 0
for i in range(0, 1000):
  c = (i//100, (i//10)%10, i%10)
  f = 0
  for s in S:
    if int(s) == c[f]:
      f += 1 
      if f==3:break 
  if f==3:cnt += 1
print(cnt)


### FIXED CODE ###

input()
S = [int(i) for i in input()]
cnt = 0
for i in range(0, 1000):
  c = (i//100, (i//10)%10, i%10)
  f = 0
  for s in S:
    if s == c[f]:
      f += 1 
      if f==3:break 
  if f==3:cnt += 1
print(cnt)
# 解説 https://betrue12.hateblo.jp/entry/2019/03/17/011847

from collections import defaultdict

mod = 10 ** 9 + 7

N = int(input())
C = [int(input()) for _ in range(N)]
L = [-1] * (N + 1)  # 出たところ
dp = [-1] * (N + 1)
dp[0] = 1

for i in range(N):
    if L[C[i]] == -1:
        dp[i + 1] = dp[i]
    elif C[i] == C[i - 1]:
        dp[i + 1] = dp[i]
    else:
        dp[i + 1] = dp[i] + dp[L[C[i]]]
    
    dp[i + 1] %= mod
    L[C[i]] = i + 1

print(dp[N])


### FIXED CODE ###

# 解説 https://betrue12.hateblo.jp/entry/2019/03/17/011847
# from collections import defaultdict

mod = 10 ** 9 + 7

N = int(input())
C = [int(input()) for _ in range(N)]
# L = [-1] * (N + 10)  # 出たところ
# dp = [-1] * (N + 10)
# dp[0] = 1
L  = [-1] * (2*10**5 + 10)
dp = [-1] * (2*10**5 + 10)
dp[0] = 1
 

for i in range(N):
    if L[C[i]] == -1:
        dp[i + 1] = dp[i]
    elif C[i] == C[i - 1]:
        dp[i + 1] = dp[i]
    else:
        dp[i + 1] = dp[i] + dp[L[C[i]]]
    
    dp[i + 1] %= mod
    L[C[i]] = i + 1

print(dp[N])
age = int(input())

if age == 7|5|3:
  print("YES")
else:
  print("NO)

### FIXED CODE ###

age = int(input())

if age == 7 or age == 5 or age == 3:
  print("YES")
else:
  print("NO")
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=[]
for i in range(10):
  if i not in a:
    m.append(i)
k=0
for a in m:
  for b in m:
    for c in m:
      for d in m:
        for e in m:
        num=a*10000+b*1000+c*100+d*10+e
        if k==0 and num>=n:
          print(num)
          k=1

### FIXED CODE ###

n,k=map(int,input().split())
m=list(map(int,input().split()))
for i in range(n,100000):
  k=1
  for a in str(i):
    if int(a) in m:
      k=0
  if k:
    print(i)
    break
N=int(input())
if N%2==0
 print(N//2)
else:
  print(N//2+1)

### FIXED CODE ###

N=int(input())
if N%2==0:
  print((N//2)/N)
else:
  print(((N//2)+1)/N)
while True:
    a, op, b = input().sprit()
    a = int(a)
    b = int(b)

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        print(a * b)

    if op == '/':
        print(a / b)

### FIXED CODE ###

while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        print(a * b)

    if op == '/':
        print(a // b)
s=int(input())
if s[-1]==2 and s[-1]==4 and s[-1]==5 and s[-1]==7 and s[-1]==9:
    print('hon')
elif s[-1]==0 and s[-1]==1 and s[-1]==6 and s[-1]==8
    print('pon')
else:
    print('bon')


### FIXED CODE ###

s=input()
if s[-1]=='3':
  print('bon')
elif s[-1] in ['0','1','6','8']:
  print('pon')
else:
  print('hon')