Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

from collections import Counter

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

c = Counter(s)
ans_number = c.most_common()[0][1]

s_max = []
for i in range(len(c)):
  if c.most_common()[i][1] == ans_number:
    s_max.append(c.most_common()[i][0])
  else:
    break;

s_max.sort()
for a in s_max:
  print(a)


### FIXED CODE ###

from collections import Counter

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

c = Counter(s)
c = c.most_common()
ans_number = c[0][1]
c.sort()

for i in range(len(c)):
  if c[i][1] == ans_number:
    print(c[i][0])
### BUGGY CODE ###

#ABC 133 Remainder Minimization 2019
l, r = [ int(_) for _ in input().split() ]

ls = []

for i in range(l,r):
    for j in range(i+1,r+1):
        ls.append(i*j)
        
print(min([ x%2019 for x in ls]))

### FIXED CODE ###

#ABC 133 Remainder Minimization 2019
l, r = [ int(_) for _ in input().split() ]

ls = [2018]

for i in range(l,r):
    for j in range(i+1,r+1):
        y = (i*j) % 2019
        if (i*j) % 2019 < min(x%2019 for x in ls):
            ls.append(i*j)
        if y == 0:
            break
    if y == 0:
        break
    
print(min([ x%2019 for x in ls]))
### BUGGY CODE ###

N = int(input())
A = [int(input()) for i in range(N)]
start = 0
ans = 1
l = 1
pre = A[0]
while len(A) > 1:
    if start == len(A)-1:
        l = 1
        A.pop(start)
        ans += 1
        start = 0
        pre = A[start]
    elif pre < A[start+1]:
        l += 1
        pre = A.pop(start+1)
    elif l == 1:
        start += 1
    else:
        l = 1
        A.pop(start)
        ans += 1
        start = 0
        pre = A[start]
print(ans)


### FIXED CODE ###

import bisect
def LIS():
    L[0] = A[0]
    length = 1
    for i in range(1, N):
        if L[length-1] < A[i]:
            L[length] = A[i]
            length += 1
        else:
            j = bisect.bisect_left(L, A[i])
            L[min(length-1, j)] = A[i]
    return length

def LISDesc():
    L[0] = A[-1]
    length = 1
    for i in range(N-2, -1, -1):
        if L[length-1] <= A[i]:
            L[length] = A[i]
            length += 1
        else:
            j = bisect.bisect_right(L, A[i])
            L[min(length-1, j)] = A[i]
    return length

INFTY = 10**13
N = int(input())
A = [int(input()) for i in range(N)]
L = [INFTY for i in range(N)]
ans = LISDesc()
print(ans)
### BUGGY CODE ###

n = int(input())
ps = [int(input()) for _ in range(n)]
maxpro = -9999999999
for i, p in enumerate(ps[:-1]):
  pro = max(ps[i + 1:]) - p
  maxpro = max(pro, maxpro)
print(maxpro)

### FIXED CODE ###

n = int(input())
ps = [int(input()) for _ in range(n)]
maxpro = -999999999
minp = 1000000000
for i, p in enumerate(ps[:-1]):
  if p >= minp: continue
  pro = max(ps[i + 1:]) - p
  maxpro = max(pro, maxpro)
  minp = p
print(maxpro)
### BUGGY CODE ###

N = int(input())
a = sorted([int(input()) for _ in range(N)])

s = sum(a)
m = (s + 1) // 2
m1 = m + 1


def func():
    ab = [[0] * m1 for _ in range(N + 1)]
    ab[0][m] = 1
    for i in range(N):
        c = a[i]
        for j in range(m1 - c):
            ab[i + 1][j] = (2 * ab[i][j] + ab[i][j + c]) % 998244353
        for j in range(m1 - c, m1):
            ab[i + 1][j] = (2 * ab[i][j] + ab[i][m]) % 998244353
    return ab[N][0]


def func1():
    ab = [[0] * m1 for _ in range(N + 1)]
    ab[0][m] = 1
    for i in range(N):
        c = a[i]
        for j in range(m1 - c):
            ab[i + 1][j] = (ab[i][j] + ab[i][j + c]) % 998244353
        for j in range(m1 - c, m1):
            ab[i + 1][j] = ab[i][j]
    return ab[N][0]


ans = 3 ** N % 998244353 - 3 * func()
if s % 2 == 0:
    ans += 3 * func1()
print(ans % 998244353)

### FIXED CODE ###

import numpy as np

N = int(input())
a = sorted([int(input()) for _ in range(N)])

s = sum(a)
m = (s + 1) // 2
m1 = m + 1


def func():
    ab = np.zeros((N + 1, m1), dtype='int64')
    ab[0, m] = 1
    for i in range(N):
        c = a[i]
        ab[i + 1, :-c] = (2 * ab[i, :-c] + ab[i, c:]) % 998244353
        ab[i + 1, -c:] = (2 * ab[i, -c:] + ab[i, m]) % 998244353
    return ab[N, 0]


def func1():
    ab = np.zeros((N + 1, m1), dtype='int64')
    ab[0, m] = 1
    for i in range(N):
        c = a[i]
        ab[i + 1, :-c] = (ab[i, :-c] + ab[i, c:]) % 998244353 
        ab[i + 1, -c:] = ab[i, -c:]
    return ab[N, 0]


ans = 3 ** N % 998244353 - 3 * func()
if s % 2 == 0:
     ans += 3 * func1()
print(ans % 998244353)
### BUGGY CODE ###

import itertools

l,r=map(int, input().split())
lis1 = []

for i in range(l,r+1):
      lis1.append(i)

lis2=[]

for v in itertools.combinations(lis1, 2):
      lis2.append(v[0]*v[1]%2019)
    
print(min(lis2))


### FIXED CODE ###

import sys
l,r = map(int,input().split())
a=[]

for i in range(l,r):
	for j in range(i+1,r+1):
		a.append((i*j)%2019)

		if (i*j)%2019 == 0:
			print(0)
			sys.exit()
print(min(a))
### BUGGY CODE ###

import numpy as np
rows = int(input())
x = [int(i) for i in input().split()]
p = 1
for i in x:
  p=p*i
if p>1000000000000000000:
  print(-1)
else:
  print(p)

### FIXED CODE ###

import sys
N=int(input())
A=[int(i) for i in input().split()]
p=1
for i in A:
  if i==0:
    print(0)
    sys.exit()
for i in A:
  p=p*i
  if p>1000000000000000000:
    print(-1)
    sys.exit()
print(p)
### BUGGY CODE ###

'''
Created on 2020/09/15

@author: harurun
'''
import sys
pin=sys.stdin.readline

N,K=map(int,pin().split())
h=list(map(int,pin().split()))
dp=[0]*N
for i in range(1,N):
  dp[i]=dp[i-1]+abs(h[i-1]-h[i])
  for j in range(1,K+1):
    if i-j>=0:
      dp[i]=min(dp[i],dp[i-j]+abs(h[i-j]-h[i]))
print(dp[N-1])
# print(dp)
#解説AC

### FIXED CODE ###

'''
Created on 2020/09/15
 
@author: harurun
'''
import sys
pin=sys.stdin.readline
 
N,K=map(int,pin().split())
h=list(map(int,pin().split()))
dp=[0]*N
for i in range(1,N):
  dp[i]=dp[i-1]+abs(h[i-1]-h[i])
  for j in range(1,K+1):
    if i-j>=0:
      dp[i]=min(dp[i],dp[i-j]+abs(h[i-j]-h[i]))
print(dp[N-1])
# print(dp)
#解説AC
### BUGGY CODE ###

from collections import defaultdict as dd
import queue
N, M, K = map(int,input().split())
ab = [tuple(map(int,input().split())) for _ in range(M)]
cd = [tuple(map(int,input().split())) for _ in range(K)]
dic = dd(list)
for (a,b) in ab:
    dic[str(a)].append(str(b))
    dic[str(b)].append(str(a))
seen = set()
def BFS(dic,node,seen):
    cc = set()
    q = queue.Queue()
    q.put(node)
    seen.add(node)
    while not q.empty():
        now_node = q.get()
        cc.add(now_node)
        target = dic[now_node]
        for tgt in target:
            if tgt not in cc:
                q.put(tgt)
                seen.add(tgt)
    return cc,seen
c_comp=[]
for i in range(1,N+1):
    if str(i) not in seen:
        # 連結判定
        tmp = BFS(dic,str(i),seen)
        seen = tmp[1]
        c_comp.append(tmp[0])

for (a,b) in cd:
    for ls in c_comp:
        #print(ls)
        if str(a) in ls and str(b) in ls:
            dic[str(a)].append(str(b))
            dic[str(b)].append(str(a))
res = [0]*N
for ls in c_comp:
    leng = len(ls)-1
    for idx in ls:
        #print(idx, len(dic[idx]), leng)
        res[int(idx)-1] = leng - len(dic[idx])
print(*res)


### FIXED CODE ###

from collections import defaultdict as dd
import queue
import sys
input = sys.stdin.readline
N, M, K = map(int,input().split())
ab = [tuple(map(int,input().split())) for _ in range(M)]
cd = [tuple(map(int,input().split())) for _ in range(K)]
dic = dd(list)
for (a,b) in ab:
    dic[str(a)].append(b)
    dic[str(b)].append(a)
uf = [-1]*N
def BFS(ufid, dic, node):
    leng = -1
    q = queue.Queue()
    q.put(node)
    while not q.empty():
        now_node = q.get()
        if uf[now_node-1] > 0:
            continue
        leng += 1
        uf[now_node-1] = ufid
        target = [val for val in dic[str(now_node)] if uf[val-1]==-1]
        for tgt in target:
            q.put(tgt)
            uf[tgt-1] = 0
    return leng

len_ls = []
var = 1
for i in range(N):
    if uf[i] == -1:
        # 連結判定
        leng = BFS(var, dic, i+1)
        len_ls.append(leng)
        var += 1
for (a,b) in cd:
    if uf[a-1] == uf[b-1]:
        dic[str(a)].append(b)
        dic[str(b)].append(a)
res = [len_ls[uf[i]-1] - len(dic[str(i+1)]) for i in range(N)]
print(*res)
### BUGGY CODE ###

n,k=map(int,input().split())
scores=list(map(int,input().split()))
t=input()
winner={'r':2,'s':0,'p':1}
ans=0
for i in range(k):
  ts=''
  for j in range(n):
    if k*j+i>=n:
      continue
    ts+=t[k*j+i]
  ts+='?'
  l=len(ts)
  hand=ts[0]
  cnt=1
  for j in range(1,l):
    if hand==ts[j]:
      cnt+=1
    else:
      ans+=scores[winner[hand]]*((cnt+1)//2)
      hand=ts[j]
      cnt=1
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
scores=list(map(int,input().split()))
t=input()
winner={'r':2,'s':0,'p':1}
ans=0
for i in range(k):
  ts=''
  for j in range(n):
    if k*j+i>=n:
      break
    ts+=t[k*j+i]
  ts+='?'
  l=len(ts)
  hand=ts[0]
  cnt=1
  for j in range(1,l):
    if hand==ts[j]:
      cnt+=1
    else:
      ans+=scores[winner[hand]]*((cnt+1)//2)
      hand=ts[j]
      cnt=1
print(ans)
### BUGGY CODE ###

import math

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

def func(n):
    num=1
    for i in range(2,int(math.sqrt(n) + 1e-9) +3):
        if n%i==0 and n!=i:
            num=0
            break
        else:
            continue
    return num

p=min(A,B)
q=max(A,B)

ans=0
for i in range(1, p+1):
    if p%i==0 and q%i==0:
        ans+=func(i)
        
print(ans)

### FIXED CODE ###

import math

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

def func(n):
    num=1
    for i in range(2,int(math.sqrt(n) + 1e-9) +3):
        if n%i==0 and n!=i:
            num=0
            break
        else:
            continue
    return num

p=min(A,B)
q=max(A,B)

ans=0
check=[]
for i in range(1, int(math.sqrt(p)+ 1e-9)+3):
    if p%i==0:
        if i not in check:
            check.append(i)
        if p//i not in check:
            check.append(p//i)

for i in check:
    if q%i==0:
        ans+=func(i)

print(ans)
### BUGGY CODE ###

N = int(input())
A = [int(i) for i in input().split()]
from collections import defaultdict
cnt_A = defaultdict(int)
for a in A:
    cnt_A[a] += 1
NG_list = []
for key in cnt_A.keys():
    if cnt_A[key] >= 2:
        NG_list.append(key)
NG_list = set(NG_list)
sort_A = sorted(A)
from collections import deque
Q = deque(sort_A)
ans = 0
while Q:
    M = Q.popleft()
    if M not in NG_list:
        ans += 1
    R = deque([])
    while Q:
        q = Q.popleft()
        if q%M != 0:
            R.append(q)
    Q = R
print(ans)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
max_a = max(a)
cnt_d = [0] * (max_a + 1)
for ai in a:
    for multi in range(ai, max_a + 1, ai):
        cnt_d[multi] += 1
print(sum(cnt_d[ai] == 1 for ai in a))
### BUGGY CODE ###

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

L.sort()

ans = 0

for i in range(N - 2):
    a = L[i]
    for j in range(i + 1, N - 1):
        b = L[j]
        left = j
        right = N
        if L[left + 1] >= a + b:
            continue
        while right - left > 1:
            mid = (left + right) // 2
            c = L[mid]
            if c < a + b:
                left = mid
            else:
                right = mid
        ans += left - j

print(ans)


### FIXED CODE ###

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

L.sort()

ans = 0

for i in range(N - 2):
    a = L[i]
    for j in range(i + 1, N - 1):
        b = L[j]
        left = j
        right = N
        if L[left + 1] >= a + b:
            continue
        while right - left > 1:
            mid = (left + right) // 2
            c = L[mid]
            if c < a + b:
                left = mid
            else:
                right = mid
        ans += left - j

print(ans)
### BUGGY CODE ###

n, k = map(int, input().split())
p = [int(i) for i in input().split()]
maxp = 0
sump = [sum(p[i: i + k]) for i in range(n - k + 1)]
maxp = max(sump)
print((maxp + k) / 2)

### FIXED CODE ###

n, k = map(int, input().split())
p = [int(i) for i in input().split()]
expp = [(i + 1) / 2 for i in p]
cumu, cumu_expp = 0, []
for i in expp:
    cumu += i
    cumu_expp.append(cumu)

max_expp = cumu_expp[k - 1]
for i in range(n - k):
    sumpk = cumu_expp[i + k] - cumu_expp[i]
    if max_expp < sumpk:
        max_expp = sumpk
print(max_expp)
### BUGGY CODE ###

import sys
from collections import deque
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split()) 
DBG = True  and False
BIG = 1234567890

def ddprint(x):
  if DBG:
    print(x)

n,m,l = inm()

distance = [ [BIG] * n for i in range(n) ]
hops = [ [(BIG,0)] * n for i in range(n) ]
for i in range(n):
  distance[i][i] = 0
  hops[i][i] = (0,0)

dst = [ [] for i in range(n) ]
for i in range(m):
  a,b,c = inm()
  if c>l:
    continue
  a -= 1
  b -= 1
  distance[a][b] = distance[b][a] = c
  dst[a].append(b)
  dst[b].append(a)

for i in range(n):
  q = deque([ (x,(0,distance[i][x])) for x in dst[i] ])
  while len(q)>0:
    y,e = q.popleft()
    #ddprint("y {} e {} {}".format(y,e[0],e[1]))
    if e>=hops[i][y]:
      continue
    #ddprint("upd i {} y {}".format(i,y))
    hops[i][y] = e
    for f in dst[y]:
      ds = distance[y][f]
      #ddprint("y {} f {} ds {}".format(y,f,ds))
      if e[1]+ds > l:
        newd = (e[0]+1, ds)
      else:
        newd = (e[0], e[1]+ds)
      if newd < hops[i][f]:
        q.append((f,newd))

if DBG:
  for i in range(n):
    print(hops[i])

B2 = BIG//2
#for i in range(n):
#  for j in range(n):
#    if hops[i][j][0] > B2:
#      hops[i][j] = (-1,0)

p = inn()
for i in range(p):
  s,t = inm()
  #ddprint("q {} s {} t {}".format(i,s,t))
  x = hops[s-1][t-1][0]
  print(x if x<B2 else -1)


### FIXED CODE ###

import sys
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
BIG = 9999999999

def ddprint(x):
  if DBG:
    print(x)

def ws(dist):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                dist[i][j] = min(dist[i][j],
                              dist[i][k]+dist[k][j])

n,m,l = inm()
dst = [ [] for i in range(n) ]
for i in range(m):
    a,b,c = inm()
    dst[a-1].append((b-1,c))
    dst[b-1].append((a-1,c))

dist1 = [ [BIG]*n for i in range(n) ]
for i in range(n):
    dist1[i][i] = 0
    for j,c in dst[i]:
        dist1[i][j] = c

ws(dist1)

dist2 = [ [BIG]*n for i in range(n) ]
for i in range(n):
    dist2[i][i] = 0
    for j in range(n):
        if dist1[i][j] <= l:
            dist2[i][j] = 1

ws(dist2)

q = inn()
for i in range(q):
    s,t = inm()
    d = dist2[s-1][t-1]
    print(d-1 if d<BIG else -1)
### BUGGY CODE ###

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

num = [0 for i in range(3)]
num[0] = a.count(0)
num[1] = a.count(1)

ans = 0
for X in range(1, 100000):
    num[(X % 3) - 2] = a.count(X + 1)
    ans = max(ans, sum(num))

print(ans)


### FIXED CODE ###

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

num = [0 for i in range(100000)]
for aa in a:
    num[aa] += 1

ans = 0
for X in range(1, 99999):
    ans = max(ans, sum(num[X-1:X+2]))

print(ans)
### BUGGY CODE ###

# -*- coding: utf-8 -*-

import sys
import math
from decimal import Decimal, ROUND_DOWN
from collections import deque
from itertools import combinations
import copy

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (n, ) = [int(e) for e in lines[0].split(' ')]
    a = [int(e) for e in lines[1].split(' ')]


    return (n, a)


def solve(n, a):

   
    total = 0
    m = int(10**9 + 7)
    for i in range(n-1):
#        for j in range(i+1, n):
#            tmp = (a[i] * a[j]) % m
#            total = (total + tmp) % m
        total = (total + (a[i] * (sum(a[i+1:n]) % m)) % m) % m
            


    return total
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()
	


### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys
import math
from decimal import Decimal, ROUND_DOWN
from collections import deque
from itertools import combinations
import copy

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (n, ) = [int(e) for e in lines[0].split(' ')]
    a = [int(e) for e in lines[1].split(' ')]


    return (n, a)


def solve(n, a):

   
    total = 0
    m = int(10**9 + 7)
    s = sum(a)
    s_current = 0
    for i in range(n):
        s_current = s_current + a[i]
        total = (total + a[i] * (s - s_current)) % m

    total = total % m


    return total
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()
### BUGGY CODE ###

k=int(input())
s=7
ans=1
if k%2==1:
    
    while True:
        if s%k==0:
            break
        else:
            s=s*10+7
            s%=k
            ans+=1
    print(ans)
else:
    print(-1)

### FIXED CODE ###

k=int(input())
ans=1
judge=0
s=7%k
while ans<=k:
    if s==0:
        judge=1
        break
    else:
        s=s*10+7
        s%=k
        ans+=1
if judge==1:
    print(ans)
else:
    print(-1)
### BUGGY CODE ###

a=int(input())
b=0
for i in range(a):
    b+=i
print(b)


### FIXED CODE ###

a=int(input())
b=(a-1)*a//2
print(b)
### BUGGY CODE ###

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

n = ni()
print(sum([i for i in range(1, n)]))

### FIXED CODE ###

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

n = ni()
print(n * (n - 1) // 2)
### BUGGY CODE ###

l=input()
n=len(l)
mod=1000000007
dp=[0]*n
dp[0]=2
ans=[0]*n
ans[0]=(3**(n-1))%mod
for i in range(1,n):
  if l[i]=='0':
    dp[i]=dp[i-1]
    ans[i]=ans[i-1]
  else:
    dp[i]=dp[i-1]*2
    ans[i]=(ans[i-1]+dp[i-1]*(3**(n-i-1)))%mod
print((ans[n-1]+dp[n-1])%mod)


### FIXED CODE ###

l=input()
n=len(l)
mod=1000000007
dp=[0]*n
dp[0]=2
ans=[0]*n
ans[0]=1
for i in range(1,n):
  if l[i]=='0':
    dp[i]=(dp[i-1])%mod
    ans[i]=(ans[i-1]*3)%mod
  else:
    dp[i]=(dp[i-1]*2)%mod
    ans[i]=(ans[i-1]*3+dp[i-1])%mod
print((ans[n-1]+dp[n-1])%mod)
### BUGGY CODE ###

def comb(n,r):
    r=min(r,n-r)
    h,k=1,1
    for i in range(1,r+1):
        h*=(n-r+i)
        k*=i
    return h//k
from bisect import bisect_left as bl,bisect_right as br
n=int(input())
l=list(map(int,input().split()))
l.sort()
mm=l[-1];ans=0;p=0
for i in range(max(0,bl(l,l[-1]//2)-1),min(n,l[-1]//2+2)):
    g=comb(mm,l[i])
    if ans<g:
        ans=g
        p=i
print(mm,l[p])


### FIXED CODE ###

from bisect import bisect_left as bl,bisect_right as br
n=int(input())
l=list(map(int,input().split()))
l.sort()
pre=10**9
mm=l[-1];p=0
for i in range(max(0,bl(l,l[-1]//2)-2),min(n,l[-1]//2+3)):
    if abs(mm/2-l[i])<pre:pre=abs(mm/2-l[i]);p=i
print(mm,l[p])
### BUGGY CODE ###

num = input().split(' ')
num_data = [int(num[i]) for i in range(3)]
#N X Y
data = [[i - 1,i + 1] if 0 < i and i < num_data[0] - 1 else [i + 1] for i in range(num_data[0])]
data[num_data[1] - 1].append(num_data[2] - 1)
data[num_data[2] - 1].append(num_data[1] - 1)
data[num_data[0] - 1][0] = num_data[0] - 2
cost = [0 for i in range(num_data[0] - 1)] #start position has the lowest number

key = 0
number = 0
for i in range(num_data[0]):
    curent = i
    count = 1
    seen = [False for i in range(num_data[0])]
    seen[i] = True
    todo = [i]
    key = 0
    while(all(seen) == False):
        if(key == 0):
            key = len(todo) - 1
        else:
            key -= 1
        for per in data[curent]:
            if(seen[per]):
                pass
            else:
                seen[per] = True
                todo.append(per)
                cost[count - 1] += 1
        todo.pop(0)
        curent = todo[0]
        if(key == 0):
            count += 1

for per in cost:
    print(int(per/2))


### FIXED CODE ###

def main():
    n,x,y = map(int,input().split(' '))
    cost = [0 for i in range(n - 1)]
    for i in range(n - 1):
        for l in range(i + 1, n):
            result = min(abs(i - l),abs(i - x + 1) + 1 + abs(l - y + 1),abs(i - y + 1) + 1 + abs(l - x + 1))
            cost[result - 1] += 1
    for per in cost:
        print(per)

if __name__ == '__main__':
    main()
### BUGGY CODE ###

n = int(input())
inuput_list = [int(i) for i in input().split()]

result = []

for i in inuput_list:
    result.append(i)
    result = result[::-1]

for i in result:
    print(str(i)+" " , end="")

### FIXED CODE ###

from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))
### BUGGY CODE ###

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


e=[(x+1)/2 for x in p]

tmp=0
for i in range(K,N+1):
	t=sum(e[i-K:i])
	tmp=max(t,tmp)

print(tmp)	




### FIXED CODE ###

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


e=[(x+1)/2 for x in p]

tmp=sum(e[0:K])
ans=tmp
for i in range(K,N):
	tmp+=e[i]-e[i-K]
	ans=max(ans,tmp)

print(ans)
### BUGGY CODE ###

N=int(input())
G=[[] for n in range(N)]
E=[]
color_map={}
for n in range(N-1):
    a,b=map(int,input().split())
    E.append((a-1,b-1))
    color_map[(a-1,b-1)]=0
    G[a-1].append(b-1)
    G[b-1].append(a-1)
deg=[len(v) for v in G]
K=max(deg)
Q=[0]
X=[]
while Q!=[]:
    v=Q.pop(0)
    X.append(v)
    for u in G[v]:
        if u not in X:
            Q.append(u)
    if v!=0:
        p=(set(X)&set(G[v])).pop()
        colors=set(range(1,K+1))
        for edge in E:
            if p in edge:
                colors-={color_map[edge]}
        a,b=min(p,v),max(p,v)
        color_map[(a,b)]=colors.pop()
print(K)
for edge in E:
    print(color_map[edge])


### FIXED CODE ###

from collections import deque

N=int(input())
G=[[] for n in range(N)]
E=[]
for n in range(N-1):
    a,b=map(int,input().split())
    E.append((a-1,b-1))
    G[a-1].append(b-1)
    G[b-1].append(a-1)
K=max([len(v) for v in G])

P=[-1]*N
Q=[0]
X=[]
count=0
while Q:
    v=Q.pop()
    X.append(v)
    for u in G[v]:
        if u==P[v]:
            continue
        P[u]=v
        Q.append(u)

C={}
for v in X:
    color=0
    try:
        p_color=C[tuple(sorted((v,P[v])))]
    except:
        p_color=-1
    for u in G[v]:
        if u==P[v]:
            continue
        if color==p_color:
            color+=1
        C[tuple(sorted((u,v)))]=color
        color+=1

print(K)
for e in E:
    print(C[e]+1)
### BUGGY CODE ###

import math
k = int(input())
g = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            a = math.gcd(i, j)
            g += math.gcd(a, k)

print(g)



### FIXED CODE ###

import math
k = int(input())
g = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            a = math.gcd(i, j)
            g += math.gcd(a, k)

print(g)