Harryxun/stf_run huggingface dataset:
n=int(input())
p=list(map(int,input().split()))

for i in range(1,n-1):

    if (p[i-1]<p[i]<p[i+1]) or (p[i+1]<p[i]<p[i-1]):
        a=1+a
print(a)

### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))
#print(n)
#print(p)
a=0
i=1

for i in range(1,n-1):

    if (p[i-1]<p[i]<p[i+1]) or (p[i+1]<p[i]<p[i-1]):
        a=1+a
print(a)
    #sumir=vie(i)+sumir
#print("")
#print(sumir)
H,A=map(int,input().split())
count=1
if H%N==0:
  for i in range(H):
    if 0<H:
      H-A
      count+=1
      H-=A
  print(count)
else:
  for i in range(H):
    if 0<H:
      H-A
      count+=1
      H-=A
  print(count+1)

### FIXED CODE ###

H,A=map(int,input().split())
N=H//A
if H%A==0:
  print(N)
else:
  print(N+1)
num = int(input())

set_ = []
for i in range(num):
  a = int(input())
  set.append(a)
  
print(len(set(set_)))
  

### FIXED CODE ###

num = int(input())

set_ = []
for i in range(num):
  a = input()
  set_.append(a)
  
print(len(set(set_)))
from collections import Counter
from operator import itemgetter

N = int(input())
A = list(map(int,input().split())) + [0]
A = list(Counter(A).items())
A  = sorted(A,key=itemgetter(1),reverse = True)
A  = sorted(A,key=itemgetter(0),reverse = True)
#print(A)
ans = 0
for i in range(len(A)):
    if A[i][1] > 1:
        if A[i][1] > 3 :
            ans = max(ans,A[i][0]*2)
        if A[i][1] > 1 and A[i+1][1] > 1:
            ans = max(ans ,A[i][0]*A[i+1][0])
print(ans

### FIXED CODE ###

from collections import Counter
from operator import itemgetter

N = int(input())
A = Counter(map(int,input().split()))
A1 = list(A.items())
A1 = sorted(A1,key=itemgetter(1),reverse = True)
A1 = sorted(A1,key=itemgetter(0),reverse = True)
#print(A1)

#正方形の場合
B =[]
for i in range(len(A1)):
    if A1[i][1] > 3:
        B.append(A1[i][0])
        if len(B) == 1:
            break
C =[]
for i in range(len(A1)):
    if A1[i][1] > 1:
        C.append(A1[i][0])
        if len(C) == 2:
            break

if len(C) == 0:
    print(0)
elif len(B) !=0:
    print(max(B[0]*B[0],C[0]*C[1]))
else:
    print(C[0]*C[1])
s=input()
s.replace("BC","D").replace("B","C")
l=[i for i in split("C") if len(i) !=0]
cnt=0
for line in l:
  dcnt =0 
  for ch in reversed(line):
    if ch = "D":
      dcnt+=1
    else:
      cnt+=dcnt

print(cnt)

### FIXED CODE ###

s=input()
s=s.replace("BC","D").replace("B","C")
l=[i for i in s.split("C") if len(i) !=0]
cnt=0

for line in l:
  dcnt =0 
  for ch in reversed(line):
    if ch == "D":
      dcnt+=1
    else:
      cnt+=dcnt

print(cnt)
N=int.input()
a=[int.input() for i in range(2)]
M=int.input()
b=[int.input() for i in range(2)]
print(min(a)+min(b))

### FIXED CODE ###

a=[]
for _ in range(4):
	a.append(int(input()))

print(min(a[0],a[1])+min(a[2],a[3]))
# coding: utf-8

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

inf = pow(10, 10)

# current_shortests = [0] + [inf] * (n-1)

in_processing = [0]  # node-number
in_processing_len = [0]
shortest_fixed = []  # node-number
shortest_fixed_len = []


def argmin(l):
    output = 0
    for i in range(len(l)):
        if l[i] < l[output]:
            output = i

    return output


def search(l, v):
    for i in range(len(l)):
        if l[i] == v:
            return i


def fun():
    k = argmin(in_processing_len)
    node = in_processing[k]

    # print("---------")
    # print(in_processing)
    # print(in_processing_len)
    # print(shortest_fixed)
    # print(shortest_fixed_len)
    # print(k)
    # print(node)
    # print("---------")

    if node == n-1:
        return in_processing_len[k]

    shortest_fixed.append(node)
    shortest_fixed_len.append(in_processing_len[k])
    del in_processing[k]
    del in_processing_len[k]

    if node+1 < n and node+1 not in shortest_fixed:
        if node+1 not in in_processing:
            in_processing.append(node+1)
            in_processing_len.append(
                shortest_fixed_len[-1] + abs(h[node+1] - h[node]))
        else:
            idx = search(in_processing, node+1)
            if in_processing_len[idx] > shortest_fixed_len[-1] + abs(h[node+1] - h[node]):
                in_processing_len[idx] = shortest_fixed_len[-1] + abs(h[node+1] - h[node])
    if node+2 < n and node+2 not in shortest_fixed:
        if node+2 not in in_processing:
            in_processing.append(node+2)
            in_processing_len.append(
                shortest_fixed_len[-1] + abs(h[node+2] - h[node]))
        else:
            idx = search(in_processing, node+2)
            if in_processing_len[idx] > shortest_fixed_len[-1] + abs(h[node+2] - h[node]):
                in_processing_len[idx] = shortest_fixed_len[-1] + abs(h[node+2] - h[node])

    output = fun()

    return output


ans = fun()

print(ans)


### FIXED CODE ###

# coding: utf-8

"""
20191116
"""

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

cost = [0, abs(h[1]-h[0])] + [None for _ in range(N-2)]

for i in range(2, N):
    cost[i] = min(cost[i-1] + abs(h[i]-h[i-1]), cost[i-2] + abs(h[i]-h[i-2]))

print(cost[N-1])
N, K = [int(_) for _ in input().split()]
import math
MOD = 10**9+7


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    print( (combinations_count(K-1,i-1)*combinations_count(N-K+1,i))%MOD )


### FIXED CODE ###

N, K = [int(_) for _ in input().split()]
import math
MOD = 10**9+7

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    try:
        print( (combinations_count(K-1,i-1)*combinations_count(N-K+1,i))%MOD )
    except:
        print(0)
# coding: utf-8
# Your code here!

food = [int(input()) for i in range(5)]

minr = 9
minf = 0
for f in food:
    if f % 10 != 0 :
        if f % 10 < minr :
            minr = f % 10
            minf = f

food.remove(minf)
food.append(minf)

sumf = 0
i = 0
for f in food:
    if i == 4:
        sumf += f
    elif f % 10 != 0:
        sumf += int(f/10) * 10 + 10
    else:
        sumf += f
    i+=1
print(sumf)

### FIXED CODE ###

# coding: utf-8
# Your code here!

food = [int(input()) for i in range(5)]

minr = 10
minf = 0
for f in food:
    if f % 10 != 0 :
        if f % 10 < minr :
            minr = f % 10
            minf = f
if minf == 0:
    minf = food[0]
        

food.remove(minf)
food.append(minf)

sumf = 0
i = 0
for f in food:
    if i == 4:
        sumf += f
    elif f % 10 != 0:
        sumf += int(f/10) * 10 + 10
    else:
        sumf += f
    i+=1
print(sumf)
inputEnzan=input().split()
stack=[]
while True:
    if "-"in inputEnzan or "+"in inputEnzan or "*"in inputEnzan :
        index=0
        while index <len(inputEnzan):
            if len(inputEnzan)==1:
                break
            if inputEnzan[index]=="-" or inputEnzan[index]=="+" or inputEnzan[index]=="*":
                if stack!=[]:
                    if inputEnzan[index]=="-":
                        inputEnzan[index]=stack[0]-stack[1]
                    elif inputEnzan[index]=="+":
                        inputEnzan[index]=stack[0]+stack[1]
                    else:
                        inputEnzan[index]=stack[0]*stack[1]
                    del inputEnzan[index-2]
                    del inputEnzan[index-2]
                    stack.clear()
                    index-=1
                else:
                    index+=1
            else:
                stack.append(int(inputEnzan[index]))
                index+=1   
    else:
        print(inputEnzan[0])
        break


### FIXED CODE ###

class stack:
    def __init__(self):
        self.s = []
    def push(self, x):
        self.s.append(x)
    def pop(self):
        ret = self.s[-1]
        del self.s[-1]
        return ret
    def size(self):
        return len(self.s)

inputL = input().split()
s = stack()
for char in inputL:
    if char == '+':
        b = s.pop()
        a = s.pop()
        s.push(a+b)
    elif char == '-':
        b = s.pop()
        a = s.pop()
        s.push(a-b)
    elif char == '*':
        b = s.pop()
        a = s.pop()
        s.push(a*b)
    elif char == '/':
        b = s.pop()
        a = s.pop()
        s.push(a/b)
    else:
        s.push(int(char))
print(s.pop())
n = int(input())
x = list(map(int, input().strip().split()))
alist=[]
for p in range (min(x),max(x)):
    ans=0
    for xi in x:
        ans += (xi-p)**2
    alist.append(ans)
    
print(min(alist))
    

### FIXED CODE ###

n = int(input())
x = list(map(int, input().strip().split()))
alist=[]
pm=10e9
for p in range (min(x),max(x)+1):
    ans=0
    for xi in x:
        ans += (xi-p)**2

    if(ans<pm):
        pm=ans
print(pm)
n = int(input())
s = list(input().split())
s = set(s)
print(s)
if len(s) == 3:
    print('Three')
else:
    print('Four')

### FIXED CODE ###

n = int(input())
if n < 3:
    print(0)
else:
    print(n // 3)
n = int(input())
k = int(input())
x = int(input())
y = int(input())
if k >= n:
  print(k*x)
else:
print(k*x+(n-k)*y)

### FIXED CODE ###

N = int(input())
K = int(input())
X = int(input())
Y = int(input())
if N > K:
    print(K*X+((N-K)*Y))
else:
    print(N*X)
n = int(input())
h = list(map(int,input().split()))
count=0
sum=1
for(i=1;i>=n;i++):
    for(s=i-1;s>=0;s--):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
sum = 1
for i in range(1,n):
  if max(h[:i])<=h[i]:
     sum+=1
print(sum)
import math

H=input()
W=input()
N=input()

k=W-3*H-math.sqrt((w-3h)**2-(w-h)**2+4N)
k=int(k)+1

print(k)

### FIXED CODE ###

import math

H=int(input())
W=int(input())
N=int(input())

if W>H :
    if N%W==0:
        k=N/W
    else:
        k=math.ceil(N/W)
else:
    if N%H==0:
        k=N/H
    else:
        k=math.ceil(N/H)

k=int(k)
print(k)
N=input()
a=list(map(int,input().split()))
print(sum(a-1))



### FIXED CODE ###

N=input()
a=list(map(int,input().split()))
print(sum([i-1 for i in a]))
s=list(map(int, input().split()))
s.sort()
s.reverse()

for i in s:
    print(i, end="")
    if i != s[-1]:
        print(" ", end="")

print()

### FIXED CODE ###

l = list(map(int, input().split()))
l.sort()
l.reverse()
sl = list(map(str, l))
print(" ".join(sl))
while True:
    if any([int(x) for x in input().split()]):
        [a,b]=sorted([int(x) for x in input().split()])
        print("a b")
    else:
        break

### FIXED CODE ###

while True:
    list=[int(x) for x in input().split()]
    if any(list):
        [a,b]=sorted(list)
        print(str(a)+" "+str(b))
    else:
        break
from sys import setrecursionlimit
setrecursionlimit(10000000)
n, q = map(int, input().split())

ct = [0] * (n+1)
o = [0] * (n+1)
g = [[] for _ in range(n+1)]

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

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

def dfs(p, parent):
  ct[p] += o[p] + ct[parent]
  for i in g[p]:
    if i != parent:
      dfs(i, p)
dfs(1, 0)
print(*counter[1:])

### FIXED CODE ###


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

ct = [0] * (n+1)
o = [0] * (n+1)
g = [[] for _ in range(n+1)]

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

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

todo = [1]
seen = [False] * (n+1)
while todo:
  p = todo.pop(-1)
  ct[p] += o[p]
  seen[p] = True
  for i in g[p]:
    if seen[i]:
      ct[p] += ct[i]
    else:
      todo.append(i)

print(*ct[1:])
n = int(input())
ls = [int(input()) for _ in range(n)]

#pp = [max(ls[i:])-x for i, x in enumerate(ls, 1) if i != len(ls)]

p = min(ls) - max(ls)

for i, x in enumerate(ls, 1):
    if i == len(pp):
        break
    if max(ls[i:]) - x > p:
        p = max(ls[i:]) - x

print(p)




### FIXED CODE ###

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

def fx(raw):
    min_n = raw[0]
    max_n = raw[1] - raw[0]
    for i in raw[1:]:
        if i - min_n >= max_n:
            max_n = i - min_n
        if i < min_n:
            min_n = i
    return max_n


if __name__ == '__main__':
    print(fx(m))
N ,K = map(int, input().split())
ans=0
for i in range(N):
  if int(input())>=K:
    ans+=1
print(ans)
    

### FIXED CODE ###

N ,K = map(int, input().split())
ans=0
h=list(map(int, input().split()))
for i in range(N):
  if h[i]>=K:
    ans+=1
print(ans)
n,m=map(int,input().split())
x=sorted([int(i) for i in input().split()])
if n>=m:
  print(0)
else:
  l=sorted([x(i+1)-x(i) for i in range(m-1)])
  print(sum(l[:m-n]))

### FIXED CODE ###

n,m=map(int,input().split())
x=sorted([int(i) for i in input().split()])
if n>=m:
  print(0)
else:
  l=sorted([x[i+1]-x[i] for i in range(m-1)])
  print(sum(l[:m-n]))
n = int(input())
a = list(map(int,input().split()))
m = max(a)
li = [0]*m 
for x in a:
    li[x] += 1
ans = 0
for i in range(1,m):
    if li[i]: 
        if li[i]==1: 
            ans += 1 
        for j in range(i,m,i): 
            li[j] = 0

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
m = max(a) + 10
li = [0]*m 
for x in a:
    li[x] += 1
ans = 0
for i in range(1,m):
    if li[i]: 
        if li[i]==1: 
            ans += 1 
        for j in range(i,m,i): 
            li[j] = 0
print(ans)
s = input()
s[:4] = "2018"
print(s)


### FIXED CODE ###

s = input()
print(s.replace("2017", "2018"))
a,b=map(int,input().split())
if a <= b:
  print(0)
else:
  print(a-b):

### FIXED CODE ###

a,b=map(int,input().split())
if a <= b:
  print(0)
else:
  print(a-b)
X,Y = int(input().split())

if X==Y:
    print(-1)
else:
    for i in range(10**18):
        X1 = int(X*i)
        if X1 % Y != 0:
            print(str(X1))
            break
    



### FIXED CODE ###

X, Y = map(int, input().split())

if X % Y == 0:
    print(-1)
else:
   print(X)
x = int(input())
if x == 3 or x == 5 or x == 7:
    print("YES")
else print("NO")

### FIXED CODE ###

x = int(input())
if x == 3 or x == 5 or x == 7:
    print("YES")
else :
    print("NO")
N = int(input())
a =[1,2,3,4,5,6,7,8,9]
for i in range(1,10000):
  b = 10**i - 1
  for j in range(1,10):
    a.append(b + j * 10 ** i)
  
for i in range(N):
  print(a[i])

### FIXED CODE ###

N,K = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
c = a.index(1)
naga = len(a)-K
if naga <= 0:
  print(1)
else:
  d = c-0
  if d != 0:
    V = K-1
    ans += d // V
    if d % V != 0:
      ans += 1
  e = N-1-c
  if e != 0:
      V = K-1
      ans += e // V
      if e % V != 0:
        ans += 1
  ans1 = 0
  ans2 = 0
  if d <= K-1:
    ans1 += 1
    ex = e -(K-d-1)
    if ex >= 0:
      V = K-1
      ans1 += ex // V
      if ex % V != 0:
        ans1 += 1
  else:
    ans1 = 999999999999999999999999999999
  if e <= K-1:
    ans2 += 1
    dx = d -(K-e-1)
    if dx >= 0:
      V = K-1
      ans2 += dx // V
      if dx % V != 0:
        ans2 += 1
  else:
    ans2 = 999999999999999999999999999999
  ans3 = 0
  ans4 = 999999999999999999
  V = K-1
  for i in range(K):
    ans3 = 0
    dx = d- i
    ex = e - (K - i - 1)
    ans3 += 1
    if dx > 0:
      if ex > 0:
        ans3 += ex//V
        if ex % V != 0:
          ans3 += 1
        ans3 += dx//V
        if dx % V != 0:
          ans3 += 1
        ans4 = min(ans4,ans3)
  print(min(ans,ans1,ans2,ans4))
h1,m1,h2,m2,k=map(int,input().split())
h_d=h2-h
m_d=m2-m1
if m_d<0:
    h_d-=1
    m_d=60+m2-m1
   
sum=60*h_d+m_d
sum-=k

if sum<0:
    print(0)
else:
    print(sum)

### FIXED CODE ###

h1,m1,h2,m2,k=map(int,input().split())
h_d=h2-h1
m_d=m2-m1
if m_d<0:
    h_d-=1
    m_d=60+m2-m1
    
sum=60*h_d+m_d
sum-=k
 
if sum<0:
    print(0)
else:
    print(sum)
p, q = map(int, input().split())
import math
def lcm(a, b):
    return (a * b) // math.gcd(a, b)

print(lcm(p, q))

### FIXED CODE ###

p, q = map(int, input().split())
import fractions
 
def lcm(a, b):
    return (a * b) // fractions.gcd(a, b)

print(lcm(p, q))
a = map(int, raw_input().strip().split())
sort(a)
if a[0] == 5 and a[1] == 5 and a[2] == 7:
	print('YES')
else:
	print("NO")

### FIXED CODE ###

a = map(int, raw_input().strip().split())
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7:
	print('YES')
else:
	print("NO")
n=int(input())

t,x,y=[],[],[]
for i in range(n):
    l=list(map(int,input().split()))
    t.append(l[0])
    x.append(l[1])
    y.append(l[2])

if n==1:
    if x+y>t or (x+y)%2!=t%2:
        print("No")
    else:
        print("Yes")
    exit()


for i in range(n-1):
    dx=abs(x[i+1]-x[i])
    dy=abs(y[i+1]-y[i])
    dt=t[i+1]-t[i]

    if dx+dy>dt or (dx+dy)%2!=dt%2:
        print("No")
        exit()


print("Yes")


### FIXED CODE ###

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

print("Odd" if (a*b)%2!=0 else "Even")
max = 0
i = 0
j = 0
k = 0
n_max = 0

n_max = int(raw_input())
price = [1,2,3,4,5]

for i in range(5)
  if max <= price[5] - price[i]:
    print max

### FIXED CODE ###

import sys

n = int(raw_input())

min_R = int(raw_input())
nums = map(int, sys.stdin.readlines())

ans = -10**9

for num in nums:
    if num - min_R > ans:
        ans = num - min_R
    if num < min_R:
        min_R = num
        
print ans
s=input()
t=input()
dp=[[-1]*(len(t)+1) for x in range(len(s)+1)]
arr = ""
# for i in range(len(s)-1,-1,-1):
#     for j in range(len(t)-1,-1,-1):
#         if s[i] == t[j]:
#             dp[i][j] = dp[i+1][j+1] + 1
#         else:
#             dp[i][j] = max(dp[i+1][j],dp[i][j+1])
# l=dp[0][0]


def func(i,j):
    if i>=(len(s)) or j>=(len(t)):
        return 0
    if dp[i][j]!=-1:
        return dp[i][j]
    if s[i]==t[j]:
        dp[i][j] = func(i+1,j+1)+1
        return dp[i][j]
    if s[i]!=t[j]:
        dp[i][j] = max(func(i+1,j),func(i,j+1))
        return dp[i][j]
l=func(0,0)

i,j=0,0
while len(arr)!=l:
    if s[i] == t[j]:
        arr=arr+s[i]
        i+=1
        j+=1
    else:
        if dp[i+1][j]>=dp[i][j+1]:
            i+=1
        else:
            j+=1
print(arr)




### FIXED CODE ###

s=input()
t=input()

dp=[[-1]*(len(t)+1) for x in range(len(s)+1)]
arr = ""
for i in range(len(s),-1,-1):
    for j in range(len(t),-1,-1):
        if i>=(len(s)) or j>=(len(t)):
            dp[i][j] = 0
        else:
            if s[i] == t[j]:
                dp[i][j] = dp[i+1][j+1] + 1
            else:
                dp[i][j] = max(dp[i+1][j],dp[i][j+1])

l=dp[0][0]
i,j=0,0
while len(arr)!=l:
    if s[i] == t[j]:
        arr=arr+s[i]
        i+=1
        j+=1
    else:
        if dp[i+1][j]>=dp[i][j+1]:
            i+=1
        else:
            j+=1

print(arr)



# def func(i,j):
    # if i>=(len(s)) or j>=(len(t)):
    #     return 0
    # if dp[i][j]!=-1:
    #     return dp[i][j]
    # if s[i]==t[j]:
    #     dp[i][j] = func(i+1,j+1)+1
    #     return dp[i][j]
    # if s[i]!=t[j]:
    #     dp[i][j] = max(func(i+1,j),func(i,j+1))
    #     return dp[i][j]
# l=func(0,0)
from sys import stdin
from collections import Counter
N = int(stdin.readline().rstrip())
data = [0] * N
for _ in range(N):
    A,B = [int(x) for x in stdin.readline().rstrip().split()]
    data[_] = (A,B)
data=sorted(data)
max_value = 0
diff = []
for j in range(0,N-1):
    for i in range(j+1,N):
        diff.append((data[j][0]-data[i][0],data[j][1]-data[i][1]))
d=Counter(diff)
    #max_value = max(max_value,max(d.values()))
print(N-max(d.values()))

### FIXED CODE ###

from sys import stdin
from collections import Counter
N = int(stdin.readline().rstrip())
data = [0] * N
if N != 1:
    for _ in range(N):
        A,B = [int(x) for x in stdin.readline().rstrip().split()]
        data[_] = (A,B)
    data=sorted(data)
    max_value = 0
    diff = []
    for j in range(0,N-1):
        for i in range(j+1,N):
            diff.append((data[j][0]-data[i][0],data[j][1]-data[i][1]))
    d=Counter(diff)
        #max_value = max(max_value,max(d.values()))
    print(N-max(d.values()))
else:
    print(1)
import itertools
import numpy as np

H, W, K = 2, 3, 4
ARR = [
    "..#",
    "###",
]
#
# H, W, K = 6, 6, 8
# ARR = [
#     "..##..",
#     ".#..#.",
#     "#....#",
#     "######",
#     "#....#",
#     "#....#"
# ]

H, W, K = map(int, input().split())
ARR2 = np.zeros((H, W))
for i in range(H):
    s = list(input())
    for j in range(W):
        if ARR[i][j] == ".":
            ARR2[i][j] == 0
        else:
            ARR2[i][j] = 1

# ARR2 = np.zeros((H, W))
# for i in range(H):
#     for j in range(W):
#         if ARR[i][j] == ".":
#             ARR2[i][j] == 0
#         else:
#             ARR2[i][j] = 1


def calclulate(h, w, k, arr):
    result = 0
    hIndex = [i for i in range(h)]
    wIndex = [i for i in range(w)]

    for hChooseNum in range(h + 1):
        for wChooseNum in range(w + 1):
            for m in itertools.combinations(hIndex, hChooseNum):
                for n in itertools.combinations(wIndex, wChooseNum):

                    tmpArr = arr.copy()

                    for _m in m:
                        tmpArr[_m, :] = 0
                    for _n in n:
                        tmpArr[:, _n] = 0

                    if np.sum(tmpArr == 1) == k:
                        result += 1
    print(result)


calclulate(H, W, K, ARR2)


### FIXED CODE ###

import itertools
import numpy as np

# H, W, K = 2, 3, 4
# ARR = [
#     "..#",
#     "###",
# ]
#
# H, W, K = 6, 6, 8
# ARR = [
#     "..##..",
#     ".#..#.",
#     "#....#",
#     "######",
#     "#....#",
#     "#....#"
# ]

H, W, K = map(int, input().split())
ARR2 = np.zeros((H, W))
for i in range(H):
    s = list(input())
    for j in range(W):
        if s[j] == ".":
            ARR2[i][j] == 0
        else:
            ARR2[i][j] = 1

# ARR2 = np.zeros((H, W))
# for i in range(H):
#     for j in range(W):
#         if ARR[i][j] == ".":
#             ARR2[i][j] == 0
#         else:
#             ARR2[i][j] = 1


def calclulate(h, w, k, arr):
    result = 0
    hIndex = [i for i in range(h)]
    wIndex = [i for i in range(w)]

    for hChooseNum in range(h + 1):
        for wChooseNum in range(w + 1):
            for m in itertools.combinations(hIndex, hChooseNum):
                for n in itertools.combinations(wIndex, wChooseNum):

                    tmpArr = arr.copy()

                    for _m in m:
                        tmpArr[_m, :] = 0
                    for _n in n:
                        tmpArr[:, _n] = 0

                    if np.sum(tmpArr == 1) == k:
                        result += 1
    print(result)


calclulate(H, W, K, ARR2)
import pandas
 
n = int(input())
s = [input() for _ in range(n)]
 
x = pandas.Series(s)
lis = x.mode().tolist()
lis = sort(lis)
for i in range(len(lis)):
  print(lis[i])

### FIXED CODE ###

import sys 
from collections import Counter
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
N = int(readline())
l = read().decode().split()
c = Counter(l)
 
max = c.most_common()[0][1]
ans = [i[0] for i in c.items() if i[1] >= max]
 
print('\n'.join(sorted(ans)))