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

n =int(input())
A=[]
for I in range(n):
  moji=list(input())
  moji.sort()
  moji=''.join(moji)
  A.append(moji)
N=0
for i in range(n):
  a=A[i]
  for s in range(i+1,n):
    b=A[s]
    if a==b:
      N+=1
print(N)

### FIXED CODE ###

n =int(input())
A=[]
for I in range(n):
  moji=list(input())
  moji.sort()
  moji=''.join(moji)
  A.append(moji)
A.sort()
N=0
SUM=0
i=0
while True:
  if i==n-1:
    SUM=SUM+int(0.5*N*(N+1))
    break
  a=A[i]
  for s in range(i+1,n,1):
    b=A[s]
    if a==b:
      N+=1
      i+=1
    else:
      SUM=SUM+int(0.5*N*(N+1))
      N=0
      i=s
      break
print(SUM)
### BUGGY CODE ###

import numpy as np
##################################################################

if __name__ == "__main__":
    Input = [input() for i in range(2)]
    N = int(Input[0])
    L = list(map(int,Input[1].split()))
    L.sort()
    L = np.array(L)
    ans = 0
    for i1 in range(N-1,1,-1):
        a = L[i1]
        for i2 in range(i1-1,0,-1):
            b = L[i2]            
            ans += sum(L[0:i2]>a-b)
    print(ans)


### FIXED CODE ###

import bisect
##################################################################
def main():
    Input = [input() for i in range(2)]
    N = int(Input[0])
    L = list(map(int,Input[1].split()))
    L.sort()
    ans = 0
    for i1 in range(0,N-2):
        a = L[i1]
        for i2 in range(i1+1,N-1):
            b = L[i2]
            ans += bisect.bisect_left(L, a+b) - i2 - 1
    print(ans)



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

from collections import deque
n = int(input())
a = deque(list(map(int,input().split())))
b = []
for i in range(n):
  b.append(a.popleft())
  b = b[::-1]
print(*b)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],end=" ")
print(*A[N%2::2])
### BUGGY CODE ###

S = list(input())


def f():
    global S
    cnt = 0
    pre = ''
    pre_idx = -1
    for i, s in enumerate(S):
        if not s: continue

        if pre and s != pre:
            cnt += 2
            S[i] = ''
            S[pre_idx] = ''
            pre = ''
        else:
            pre = s
            pre_idx = i
    S = [s for s in S if s]
    return cnt


res = 0
while 1:
    tmp = f()
    if not tmp: break
    res += tmp

print(res)


### FIXED CODE ###

S = list(input())
stack = []

res = 0

for s in S:
    if stack and stack[-1] != s:
        stack.pop()
        res += 2
        continue
    stack.append(s)
print(res)
### BUGGY CODE ###

#coding: UTF-8
import time
N=int(input())
lis=list(map(int, input().split()))
kind=list(set(lis))
kindn=len(kind)
out=0
for i in kind:
    if lis.count(i)%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)

### FIXED CODE ###

#coding: UTF-8
import time
import collections
N=int(input())
lis=list(map(int, input().split()))
#kind=set(lis)
#kindn=len(kind)
kind_dict=collections.Counter(lis)
kindn=len(kind_dict)
out=0
for i in kind_dict:
    if kind_dict[i]%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)
### BUGGY CODE ###

N,M = map(int,input().split())
path = [[] for _ in range(N*3+3)]
for _ in range(M):
    u,v = map(int,input().split())
    path[u].append(v+N)
    path[u+N].append(v+N+N)
    path[u+N+N].append(v)

S,T = map(int,input().split())
import collections

q = collections.deque()
vis = [10**10 for _ in range(N*3+3)]
def bfs():
    for _ in range(10**6):
        if len(q) == 0: break
        now,cnt = q.popleft()
        #print(now,T,cnt,path[now],q)
        vis[now] = min(vis[now],cnt)
        if now == T: 
            return cnt
        for x in path[now]:
            if vis[x] == 10**10:
                q.append([x,cnt+1])
vis[S] = 1
q.append([S,0])
ans = bfs()
if vis[T] == 10**10: print(-1)
else: print(ans//3)




### FIXED CODE ###

N,M = map(int,input().split())
import time
start_t = time.time()
path = [[] for _ in range(N+3)]
for _ in range(M):
    u,v = map(int,input().split())
    path[u].append(v)

S,T = map(int,input().split())
import collections

q = collections.deque()
vis = [[-1 for _ in range(3)] for _ in range(N+3)]
vis[S][0] = 1
q.append([S,0])
while len(q):
    now,cnt = q.popleft()
    step = cnt % 3
    for x in path[now]:
        if vis[x][(step+1)%3] < 0:
            vis[x][(step+1)%3] = cnt
            q.append((x,cnt+1))

if vis[T][0] == -1:
    print(-1)
else:
    print(vis[T][0]//3+1)
### BUGGY CODE ###

from collections import deque

H, W = map(int, input().split())
Ch, Cw = map(int, input().split())
Dh, Dw = map(int, input().split())
maze = [input() for i in range(H)]

queue = deque()
queue.append((Ch-1, Cw-1, 0))
inf = float("inf")
table = [[inf] * W for i in range(H)]
table[Ch-1][Cw-1] = 0
walk_move = ((-1, 0), (0, -1), (1, 0), (0, 1))
magic_move = []
for i in range(-2, 3):
  for j in range(-2, 3):
    if not i and not j:
      continue
    else:
      magic_move.append([i, j])

while queue:
  x, y, cost = queue.popleft()
  for i,j in walk_move:
    dx = x+i
    dy = y+j
    if 0 <= dx <= H-1 and 0 <= dy <= W-1 and maze[dx][dy] == "." and table[dx][dy] > cost:
      queue.appendleft((dx, dy, cost))
      table[dx][dy] = cost
  for k,l in magic_move:
    dx = x+k
    dy = y+l
    if 0 <= dx <= H-1 and 0 <= dy <= W-1 and maze[dx][dy] == "." and table[dx][dy] > cost+1:
      queue.append((dx, dy, cost+1))
      table[dx][dy] = cost+1

ans = table[Dh-1][Dw-1]
if ans == inf:
  print("-1")
else:
  print(table[Dh-1][Dw-1])

### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
Ch, Cw = map(int, input().split())
Dh, Dw = map(int, input().split())
maze = [input() for i in range(H)]

queue = deque()
queue.append((Ch-1, Cw-1, 0))
inf = float("inf")
table = [[inf] * W for i in range(H)]
table[Ch-1][Cw-1] = 0
walk_move = ((-1, 0), (0, -1), (1, 0), (0, 1))
magic_move = []
for i in range(-2, 3):
  for j in range(-2, 3):
    if not i and not j:
      continue
    else:
      magic_move.append([i, j])

while queue:
  x, y, cost = queue.popleft()
  for i,j in walk_move:
    dx = x+i
    dy = y+j
    if 0 <= dx <= H-1 and 0 <= dy <= W-1 and maze[dx][dy] == "." and table[dx][dy] > cost:
      queue.appendleft((dx, dy, cost))
      table[dx][dy] = cost
  for k,l in magic_move:
    dx = x+k
    dy = y+l
    if 0 <= dx <= H-1 and 0 <= dy <= W-1 and maze[dx][dy] == "." and table[dx][dy] > cost+1:
      queue.append((dx, dy, cost+1))
      table[dx][dy] = cost+1

ans = table[Dh-1][Dw-1]
if ans == inf:
  print("-1")
else:
  print(table[Dh-1][Dw-1])
### BUGGY CODE ###

import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    N, K = NMI()
    A = list(sorted([NLI() for _ in range(K)]))
    
    ls = [0 for _ in range(N)]
    ls[0] = 1

    for n in range(1,N):
        for k in range(K):
            for x in range(A[k][0],A[k][1]+1):
                if 0 <= n-x:
                    ls[n] += ls[n-x]
                    ls[n] = ls[n]%MOD2
    print(ls[-1])
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    N, K = NMI()
    LR = list(sorted([NLI() for _ in range(K)]))
    
    dp = [0 for _ in range(N)]
    dp[0] = 1
    
    cumsum = [0 for _ in range(N+1)]
    cumsum[0] = 0
    cumsum[1] = 1
    
    for n in range(1,N):
        for k in range(K):
            r = n-LR[k][0]
            l = n-LR[k][1]
            if r < 0:
                continue
            else:
                l = max(0,l)
            dp[n] += cumsum[r+1]-cumsum[l]
        dp[n] = dp[n]%MOD2
        cumsum[n+1] = (dp[n] + cumsum[n])%MOD2
    print(dp[-1])
if __name__ == '__main__':
    main()
### BUGGY CODE ###

a,b,k=input().split()
a=int(a)
b=int(b)
for i in range(int(k)):
  if a>=1:
    a-=1
  elif b >=1:
    b-=1
print(a,b)

### FIXED CODE ###

a,b,k=map(int,input().split())
if k>=a:
  k-=a
  a=0
else:
  a-=k
  k=0
if k>0:
  b-=k
if b<0:
  b=0
print(a,b)
### BUGGY CODE ###

a=int(input())
count=0
s=1
while True:
  if a!=1:
    a=a//2
    count+=1
    s+=2**count
  else:
    s+=2**count


### FIXED CODE ###

a=int(input())
count=0
s=0
while True:
  if a>1:
    a//=int(2)
    count+=1
    s+=2**count
  else:
    s+=1
    print(s)
    break
### BUGGY CODE ###

N, M = map(int, input().split())
L = [0] * M
R = [0] * M
for i in range(M):
  L[i], R[i] = map(int, input().split())

ALL = [0] * N

for i in range(M):
  for j in range(L[i]-1, R[i]):
    ALL[j] += 1

print(ALL.count(M))  

### FIXED CODE ###

N, M = map(int, input().split())
L = [0] * M
R = [0] * M
for i in range(M):
  L[i], R[i] = map(int, input().split())

print(max(0,min(R) - max(L)+1))
### BUGGY CODE ###

from itertools import combinations


def solve(a, b, c):
    x = a < b + c
    y = b < c + a
    z = c < a + b

    return all([x, y, z])


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

li = list(combinations(l, 3))

ans = 0
for a, b, c in li:
    if solve(a, b, c):
        ans += 1

print(ans)

### FIXED CODE ###

from bisect import bisect_left
import copy

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


ans = 0
for small in range(n - 2):
    for mid in range(small + 1, n - 1):
        div = bisect_left(l, l[small] + l[mid], 0, n)
        if div > mid + 1:
            ans += div - mid - 1

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

#

import sys
from fractions import gcd
input=sys.stdin.readline

def main():
    N=int(input())
    A=list(map(int,input().split()))
    if N==1:
        print(1)
        exit()
    l=(A[0]*A[1])//gcd(A[0],A[1])
    
    for i in range(2,N):
        l=(l*A[i])//gcd(A[i],l-A[i])
    ans=0
    for i in range(N):
        bi=l//A[i]
        ans+=bi
        ans%=10**9+7
    print(ans)
    
    
    
if __name__=="__main__":
    main()


### FIXED CODE ###

#

import sys
from fractions import gcd
input=sys.stdin.readline

def main():
    MOD=10**9+7
    N=int(input())
    A=list(map(int,input().split()))
    if N==1:
        print(1)
        exit()
    l=(A[0]*A[1])//gcd(A[0],A[1])
    for i in range(2,N):
        l=(l*A[i])//gcd(A[i],l-A[i])
    l%=MOD
    ans=0
    for i in range(N):
        ans+=l*pow(A[i],MOD-2,MOD)
        ans%=MOD
    print(ans)
    
    
    
if __name__=="__main__":
    main()
### BUGGY CODE ###

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

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n, k = input_to_int_map()
    a = {i + 1: int(val) for i, val in enumerate(input().split())}

    place = 1
    place_goned = [place]
    i = 0
    while i < n:
        place = a[place]
        if place in place_goned:
            break

        place_goned.append(place)
        i += 1

    if k < len(place_goned):
        return place_goned[k]

    pre_loop_cnt = place_goned.index(place)
    move_cnt = k - pre_loop_cnt
    loop_list = place_goned[pre_loop_cnt:]
    return loop_list[move_cnt % len(loop_list)]


if __name__ == "__main__":
    print(main())


### FIXED CODE ###

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

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n, k = input_to_int_map()
    a = {i + 1: int(val) for i, val in enumerate(input().split())}

    place = 1
    visit = {place}
    place_visits = [place]
    for i in range(k):
        place = a[place]
        if place in visit:
            left = place_visits.index(place)
            return place_visits[left + (k - left) % (i + 1 - left)]
        else:
            visit.add(place)
            place_visits.append(place)

    return place


if __name__ == "__main__":
    print(main())
### BUGGY CODE ###

def isPrime(x):
    if x==1:
        return False
    for i in range(2, int(x**0.5)+1):
        if x%i==0:
            return False
    return True

def primeFactorization2(x):
    ps = []
    es = []
    i=2
    while i<=x:
        if x%i==0 and isPrime(i):
            ps.append(i)
            e=0
            while x%i==0:
                x = x//i
                e+=1
            es.append(e)
        i+=1
    return [ps, es]


n=int(input())

if isPrime(n):
    print(1)
else:
    nums = primeFactorization2(n)[1]

    ans=0
    for i in nums:
        ans += int(((1+8*i)**0.5-1)/2)

    print(ans)
    
            
        
    
    
    


### FIXED CODE ###

def isPrime(x):
    if x==1:
        return False
    for i in range(2, int(x**0.5)+1):
        if x%i==0:
            return False
    return True

def primeFactorization2(x):
    ps = []
    es = []
    i=2
    k=x
    while i<=k**0.5:
        if k%i==0 and isPrime(i):
            ps.append(i)
            e=0
            while k%i==0:
                k = k//i
                e+=1
            es.append(e)
        i+=1
    if x==1:
        return [[],[]]
    elif isPrime(x):
        return [[x],[1]]
    else:
        return [ps + primeFactorization2(k)[0], es + primeFactorization2(k)[1]]


n=int(input())

if isPrime(n):
    print(1)
else:
    nums = primeFactorization2(n)[1]

    ans=0
    for i in nums:
        ans += int(((1+8*i)**0.5-1)/2)

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

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

for i in range(m//n, 0, -1):
    if m%i == 0:
        print(i)
        break

    


### FIXED CODE ###

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

cands = []
for i in range(1, int(m**(1/2))+1):
    if m%i == 0:
        cands.append(i)
        cands.append(m//i)
cands = sorted(cands, reverse = True)
# print(cands)

for c in cands:
    if m//c >= n:
        print(c)
        break
### BUGGY CODE ###

# coding: utf-8
N, K = map(int, input().split())
H = []
for i in range(N):
    h = int(input())
    H.append(h)
H.sort()
L = []
for i in range(N-K+1):
    tmp = H[i:i+K]
    L.append(abs(tmp[0] - tmp[-1]))
print(min(L))

### FIXED CODE ###

n, k = map(int, input().split())
tree = [int(input()) for _ in range(n)]
tree.sort()
print(min(tree[i+k-1] - tree[i] for i in range(n-k+1)))
### BUGGY CODE ###

N,S = map(int,input().split())
A = list(map(int,input().split()))

MOD = 998244353

dp = [[0]*(S+1) for _ in range(N+1)]
dp[0][0] = 1

for i in range(N):
    for j in range(S+1):
        dp[i+1][j] += dp[i][j] * 2 % MOD
        if j - A[i] >= 0:
            dp[i+1][j] += dp[i][j-A[i]]
        dp[i+1][j] %= MOD
        
print(dp[N][S])

### FIXED CODE ###

N,S = map(int,input().split())
A = list(map(int,input().split()))

MOD = 998244353

dp = [[0]*(S+1) for _ in range(N+1)]
dp[0][0] = 1

for i in range(N):
    for j in range(S+1):
        dp[i+1][j] += dp[i][j] * 2 % MOD
        if j - A[i] >= 0:
            dp[i+1][j] += dp[i][j-A[i]]
        dp[i+1][j] %= MOD
        
print(dp[N][S])
### BUGGY CODE ###

print([1/id('hoge')%5%2]*2**28**id('fuga')and'Yes')

### FIXED CODE ###

n,a=open(0)
n=int(n)
a=sorted(map(int,a.split()))
if a[0]==a[-1]:
  if n-1==a[0]or n//a[0]>=2:
    print('Yes')
  else:
    print('No')
elif a[-1]-1==a[0]:
  x=a.count(a[0])
  if x<a[-1]and(n-x)//(a[-1]-x)>=2:
    print('Yes')
  else:
    print('No')
else:
  print('No')
### BUGGY CODE ###

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

def hurui(n):
  data = [i for i in range(2, n + 1)]
  for d in data:
    data = [x for x in data if (x == d or x % d != 0)]
  return data

MAX = 2*(10**5)

fac = [1]*(MAX+1)
for i in range(1,MAX+1):
    fac[i] = (fac[i-1]*i)%mod

rev_m = [1]*(MAX+1)
rev_m[MAX] = pow(fac[MAX],mod-2,mod)
for i in range(MAX,0,-1):
    rev_m[i-1] = (rev_m[i]*i)%mod

def Comb(n,k):#nCk
    return (fac[n]*rev_m[k]*rev_m[n-k])%mod


N,M = inpl()
Primes = hurui(10000)
kk = [0]*10000

while M > 1:
  for i,p in enumerate(Primes):
    if M%p == 0:
      kk[i]+=1
      M//=p
      break
      
ans =1
for k in kk:
  ans *= Comb(k+N-1,k)
  ans %= mod
  
print(ans)
  






### FIXED CODE ###

from collections import defaultdict
import sys,heapq,bisect,math,itertools,string

def factors_nojit(n):
    gaps = [1,2,2,4,2,4,2,4,6,2,6]
    length, cycle = 11, 3
    f, fs, nxt = 2, [], 0
    while f * f <= n:
        while n % f == 0:
            fs.append(f)
            n0 = n
            n //= f
        f += gaps[nxt]
        nxt += 1
        if nxt == length:
            nxt = cycle
    if n > 1: fs.append(n)
    return fs

MAX = 10**5 + 100
mod = 10**9+7

fac = [1]*(MAX+1)
for i in range(1,MAX+1):
    fac[i] = (fac[i-1]*i)%mod

rev_m = [1]*(MAX+1)
rev_m[MAX] = pow(fac[MAX],mod-2,mod)
for i in range(MAX,0,-1):
    rev_m[i-1] = (rev_m[i]*i)%mod

def Comb(n,k):#nCk
    return (fac[n]*rev_m[k]*rev_m[n-k])%mod

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

fs =  factors_nojit(M)
fs.sort()

dd = defaultdict(int)
ed = []
for f in fs:
    if dd[f] == 0:
        ed.append(f)
    dd[f] += 1

ans =1
for e in ed:
  k = dd[e]
  ans *= Comb(k+N-1,k)
  ans %= mod

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

dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
s = []
d = {}
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            if (A,B) not in s:
                d[(A,B)] = 0
                s.append((A,B))
            d[(A,B)] += 1
ans = [(H-2)*(W-2)-len(s),0,0,0,0,0,0,0,0,0]
for (x,y) in s:
    ans[d[(x,y)]] += 1
for i in range(10):
    print(ans[i])

### FIXED CODE ###

dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
from collections import defaultdict, Counter
d = defaultdict(int)
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            d[(A,B)] += 1
s = 0
c = Counter(d.values())
for i in range(1,10):
    s += c[i]
c[0] = (H-2)*(W-2) - s
for i in range(10):
    print(c[i])
### BUGGY CODE ###

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

dp=[10**9]*(N)
dp[0]=0
for i in range(N-1):
    for j in range(1,K+1):
        if i+j<=N-1:
            dp[i+j]=min(abs(H[i]-H[i+j])+dp[i],dp[i+j])

print(dp[N-1])

### FIXED CODE ###

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

dp=[10**9]*(N)
dp[0]=0
for i in range(N-1):
    for j in range(1,K+1):
        if i+j<=N-1:
            dp[i+j]=min(abs(H[i]-H[i+j])+dp[i],dp[i+j])

print(dp[N-1])
### BUGGY CODE ###

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

ans = 0
for i in range(1, N+1):
    for j in range(i+A[i-1]+1, N+1):
        if abs(i - j) == A[i-1] + A[j-1]:
            ans += 1
print(ans)


### FIXED CODE ###

from collections import defaultdict

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

mp = defaultdict(lambda: [0, 0])
for i in range(1, N+1):
    L = i + A[i-1]
    R = i - A[i-1]
    mp[L][0] += 1
    mp[R][1] += 1

ans = 0
for v in mp.values():
    ans += v[0] * v[1]
print(ans)
### BUGGY CODE ###

N,M=map(int,input().split())
A=list(map(int,input().split()))
for i in range(M):
  A=sorted(A)
  A[len(A)-1]=A[len(A)-1]//2
print(sum(A))

### FIXED CODE ###

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

while M>0:
    A.sort(reverse=True)
    if A[0]==0:
        break
    judge=A[0]//2
    for i in range(len(A)):
        if A[i]>judge and M>0:
            A[i]=A[i]//2
            M-=1
        else:
            break
print(sum(A))
### BUGGY CODE ###

import sys
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(100000)
mod = 10 ** 9 + 7

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v
 
    def __str__(self):
        return str(self.v)
 
    def ud(self, n):
        if self.v is None:
            self.v = n
        else:
            self.v = self.f(self.v, n) 

def SS(L):
    S = [0] * (len(L))
    for i, l in enumerate(L):
        S[i + 1] = S[i] + l

    return S


def main():
    N, X, Y = read_values()
    X -= 1
    Y -= 1
    res = [0] * N

    for i in range(N):
        stack = [i]
        close = set()
        c = 0
        while len(stack) != 0:
            stack2 = []
            for s in stack:
                if s in close:
                    continue
                close.add(s)
                res[c] += 1
                if s + 1 < N and not s + 1 in close:
                    stack2.append(s + 1)
                if s > 0 and not s - 1 in close:
                    stack2.append(s - 1)
                if s == X and not Y in close:
                    stack2.append(Y)
                if s == Y and not X in close:
                    stack2.append(X)
            c += 1
            stack = stack2[:]

    for r in res[1:]:
        print(r // 2)
        
if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
import itertools
import queue
input = sys.stdin.readline
sys.setrecursionlimit(100000)
mod = 10 ** 9 + 7

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v
 
    def __str__(self):
        return str(self.v)
 
    def ud(self, n):
        if self.v is None:
            self.v = n
        else:
            self.v = self.f(self.v, n) 


def main():
    N, X, Y = read_values()
    X -= 1
    Y -= 1
    res = [0] * N

    for i in range(N - 1):
        for j in range(i + 1, N):
            d = min(
                j - i,
                abs(X - i) + 1 + abs(Y - j),
                abs(Y - i) + 1 + abs(X - j),
            )

            res[d] += 1

    for r in res[1:]:
        print(r)


if __name__ == "__main__":
    main()