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


def parse():
  H, W = map(int, input().split(" "))
  grid = [list(input()) for y in range(H)]
  return H, W, grid

def print_grid(grid):
  H = len(grid)
  print("grid:")
  for line in grid:
    for c in line:
      print(c, end="")
    print("")

def main():
  H, W, grid = parse()
  # print(H, W)
  # print_grid(grid)

  visited = [[W * H if grid[y][x] == "." else 0 for x in range(W)] for y in range(H)]
  # for y in range(H):
  #   visited.append([])
  #   for x in range(W):
  #     if grid[y][x] == ".":
  #       visited[y].append(H * W)
  #     else:
  #       visited[y].append(0)
    # print(visited[y])
  
  for y in range(H):  # ↓
    for x_right, x_left in zip(range(1, W), range(W - 2, -1, -1)):  # →，←
      # →
      visited_left = visited[y][x_right - 1] + 1
      visited[y][x_right] = visited_left if visited_left < visited[y][x_right] else visited[y][x_right]
      
      # ←
      visited_right = visited[y][x_left + 1] + 1
      visited[y][x_left] = visited[y][x_left] if visited[y][x_left] < visited_right else visited_right

  for x in range(W):  # →
    for y_down, y_up in zip(range(1, H), range(H - 2, -1, -1)):  # ↓，↑
      # ↓
      visited_up = visited[y_down - 1][x] + 1
      visited[y_down][x] = visited_up if visited_up < visited[y_down][x] else visited[y_down][x]
      
      # ↑
      visited_down = visited[y_up + 1][x] + 1
      visited[y_up][x] = visited[y_up][x] if visited[y_up][x] < visited_down else visited_down
  
  max_len = 0
  for y in range(H):
    max_len = max_len if max_len > max(visited[y]) else max(visited[y])
  print(max_len)

if __name__ == "__main__":
  main()

### FIXED CODE ###


import numpy as np

def parse():
  H, W = map(int, input().split(" "))
  grid = [list(input()) for y in range(H)]
  return H, W, grid

def print_grid(grid):
  H = len(grid)
  print("grid:")
  for line in grid:
    for c in line:
      print(c, end="")
    print("")

def main():
  H, W, grid = parse()
  # print(H, W)
  # print_grid(grid)

  # visited = [[W * H if grid[y][x] == "." else 0 for x in range(W)] for y in range(H)]
  visited = np.zeros((H, W), int)
  for y in range(H):
    # visited.append([])
    for x in range(W):
      if grid[y][x] == ".":
        visited[y][x] = H * W

  for y in range(1, H):  # ↓
    # 要素ごとの処理
    # print(visited)
    visited[y][:] = np.minimum(visited[y][:], visited[y - 1][:] + 1)
    # print(visited)
    # input()
    # print(visited[y])
    # exit(0)

  for y in range(H - 2, -1, -1):
    visited[y, :] = np.minimum(visited[y, :], visited[y + 1][:] + 1)

  for x in range(1, W):
    visited[:, x] = np.minimum(visited[:, x], visited[:, x - 1] + 1)

  for x in range(W - 2, -1, -1):
    visited[:, x] = np.minimum(visited[:, x], visited[:, x + 1] + 1)

  # print(visited)
  # exit(0)

  # max_len = 0
  # for y in range(H):
  #   max_val = max(visited[y])
  #   max_len = max_len if max_len > max_val else max_val
  # print(max_len)
  print(np.max(visited))

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

A, B, K = map(int, input().split())
ans = [i for i in range(A, B + 1) if A + K > i or  B - K < i]

for i in ans:
    print(i)


### FIXED CODE ###

A, B, K = map(int, input().split())
for i in range(A, min(A + K, B + 1)):
    print(i)

for i in range(max(B - K + 1, A + K), B + 1):
    print(i)
### BUGGY CODE ###

import sys
sys.setrecursionlimit(200005)
n, q = map(int, input().split())

to = [[] for i in range(n+1)]


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

score = [0]*(n+1)
h = [0] * (n+1)
for i in range(q):
    p, x = map(int, input().split())
    h[p] += x


def down_tree(index, parent):
    global score
    score[index] += score[parent] + h[index]
    for i in to[index]:
        if i == parent:
            continue
        down_tree(i, index)
    return


down_tree(1, 1)

print(*score[1:])

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(200005)
n, q = map(int, input().split())

to = [[] for i in range(n+1)]


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

score = [0]*(n+1)
for i in range(q):
    p, x = map(int, input().split())
    score[p] += x


def down_tree(index, parent):
    for i in to[index]:
        if i == parent:
            continue
        score[i] += score[index]
        down_tree(i, index)



down_tree(1, 1)

print(' '.join(map(str, score[1:])))
### BUGGY CODE ###

import sys
N=int(input())
S=input()

def search_k(k):
  if k==0:
    return True
  elif k in search_dic:
    return search_dic[k]
  
  for i in range(N-2*k+1):
    for j in range(i+k,N-k+1):
      for kk in range(k):
        if S[i+kk]!=S[j+kk]:
          break
      else:
        search_dic[k]=True
        return True
      
  search_dic[k]=False
  return False

search_dic={}
l,r=0,N//2
while(l<=r):
  mid=(l+r)//2
  
  res1=search_k(mid)
  res2=search_k(mid+1)
  if res1 and not res2:
    print(mid)
    sys.exit(0)
  elif res1:
    l=mid+1
  else:
    r=mid-1

### FIXED CODE ###

import sys
N=int(input())
S=input()

def z_alg(S):
  N=len(S)
  Z=[N]+[0]*(N-1)
  i,j=1,0
  while i<N:
    while i+j<N and S[j]==S[i+j]:
      j+=1
    if not j:
      i+=1
      continue
    Z[i]=j
    k=1
    while N-i>k and k<j-Z[k]:
      Z[i+k]=Z[k]
      k+=1
    i+=k
    j-=k
  return Z

answer=0
for i in range(N):
  zlist=z_alg(S[i:])
  #print(i,S[i:],zlist)
  for j in range(N-i):
    if j>=zlist[j] and answer<zlist[j]:
      answer=zlist[j]
      
print(answer)
### BUGGY CODE ###

import queue
from collections import deque

def resolve():
    # ★get input
    h, w = map(int, input().split())

    grid = [["" for i in range(w)] for j in range(h)]

    for i in range(h):
        line = list(input())
        for j in range(w):
            grid[i][j] = line[j]
        # 以下の様にsliceで取得することもできるが、パフォーマンスが若干落ちる。
        # 1000×1000件で50ミリ秒くらい差が出る。
        # line = input()
        # for j in range(w):
        #     grid[i][j] = line[j:j+1]

    # ★exec
    # BFSにて最短経路を求める
    # 準備
    distance = [[-1 for i in range(w)] for j in range(h)]
    que = deque()

    # スタート地点の情報を設定
    # 多点スタートの設定
    for i in range(h):
        for j in range(w):
            if grid[i][j] == "#":
                que.append([i, j])
                distance[i][j] = 0

    # BFS開始
    while not que.__len__() == 0:

        now = que.popleft()

        # 上下左右のマスを確認
        for move_y, move_x in ((1, 0), (-1, 0), (0, 1), (0, -1)):

            # 盤の範囲外なら何もしない
            target = [now[0] + move_y, now[1] + move_x]
            if not h > target[0] >= 0 or not w > target[1] >= 0:
                continue

            # 黒塗りされているなら何もしない
            if grid[target[0]][target[1]] == '#':
                continue

            # 距離が設定済みなら何もしない
            if not distance[target[0]][target[1]] == -1:
                continue

            # キューに追加
            que.append(target)

            # 最短距離を設定
            distance[target[0]][target[1]] = distance[now[0]][now[1]] + 1

    # 距離が最大の点 = 答えになる。
    ans = 0
    for i in range(h):
        ans = max(ans, max(distance[i]))

    print(ans)


if __name__ == "__main__":
    resolve()


### FIXED CODE ###

from collections import deque

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

# 初期の黒('#')の位置からの距離
dist = [[-1]*W for _ in range(H)]

# '#'の位置をキューに追加（＝今回はこれが複数あるので、複数スタートとなる）
black_cells = deque()
for h in range(H):
    for w in range(W):
        if grid[h][w] == '#':
            black_cells.append((h, w))
            dist[h][w] = 0

def bfs(black_cells, dist):
    """
    BFSを用いて、全マス目を黒くする回数を求める

    Args:
        black_cells: 「開始時の黒マス」の座標が入ったキュー（複数座標あり）
        dist: 「開始時の黒マス」からの距離の入ったリスト  [[-1, -1, 0], ...]
        　　　（白マスの初期値は0）

    Returns:
        g: 操作を繰り返した数
    """
    d = 0
    while black_cells:
        # キューとして使うのでpop()ではなくpopleft()
        h, w = black_cells.popleft()
        d = dist[h][w]
        for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)):
            new_h = h + dy
            new_w = w + dx
            if new_h < 0 or H <= new_h or new_w < 0 or W <= new_w:
                continue
            if dist[new_h][new_w] == -1:  # セルが白('.')であるのと同義
                dist[new_h][new_w] = d+1
                black_cells.append((new_h, new_w))
    return d

d = bfs(black_cells, dist)
print(d)
### BUGGY CODE ###

x,y,z,k = input().strip().split(' ')
x,y,z,k = [int(x), int(y),int(z),int(k)]
aList = list(map(int, input().strip().split(' ')))
bList = list(map(int, input().strip().split(' ')))
cList = list(map(int, input().strip().split(' ')))
ansList = []
aList
for i in range(min(len(aList),k)):
        for j in range(min(len(bList),k)):
                for n in range(min(len(cList),k)):
                        y = aList[i] + bList[j] + cList[n]
                        ansList.append(y)
ansList.sort(reverse = True)

for i in range(k):
        print(ansList[i])


### FIXED CODE ###

x,y,z,k = input().strip().split(' ')
x,y,z,k = [int(x), int(y),int(z),int(k)]
aList = list(map(int, input().strip().split(' ')))
bList = list(map(int, input().strip().split(' ')))
cList = list(map(int, input().strip().split(' ')))
ansList = []
# aList.sort(reverse = True)
# bList.sort(reverse = True)
# cList.sort(reverse = True)

abList = []
for i in range(len(aList)):
        for j in range(len(bList)):
                abList.append(aList[i] + bList[j])
abList.sort(reverse = True)
abcList = []
for s in range(min(len(abList),k)):
        for t in range(len(cList)):
                abcList.append(abList[s] + cList[t])
abcList.sort(reverse = True)
for a in range(min(len(abcList),k)):
        print(abcList[a])
### BUGGY CODE ###

import sys
import math
from functools import reduce


def main():
    input = sys.stdin.readline
    K = int(input())
    assert 1 <= K <= 200
    total = 0
    for i in range(1, K+1):
        for j in range(1, K+1):
            for k in range(1, K+1):
                total += gcd_list([i, j, k])
    print(total)


def gcd(*numbers):
    return reduce(math.gcd, numbers)


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
import math
from functools import reduce


def main():
    input = sys.stdin.readline
    K = int(input())
    assert 1 <= K <= 200
    total = 0
    for i in range(1, K+1):
        for j in range(1, K+1):
            a = euclidean_algorithm(i, j)
            for k in range(1, K+1):
                total += euclidean_algorithm(a, k)
    print(total)


def gcd_list(numbers):
    return reduce(euclidean_algorithm, numbers)


def euclidean_algorithm(a, b):
    r = a % b
    while r != 0:
        a = b
        b = r
        r = a % b
    return b


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

a , b , x = map(int, input().split())
ans = 0

for i in range(a , b + 1):
    if(i % x == 0):
        ans += 1

print(ans)

### FIXED CODE ###

a , b , x = map(int, input().split())
ans = b // x

if a == 0:
    print(ans + 1)
else:
    print(ans - (a - 1) // x)
### BUGGY CODE ###

import math
from itertools import product

N = int(input())


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


def F(a, b):
    a = int(math.log10(a)) + 1
    b = int(math.log10(b)) + 1
    return max(a, b)


p = prime_decomposition(N)

ans = float('inf')
for x in product([True, False], repeat=len(p)):
    a, b = 1, 1
    for i in range(len(p)):
        if x[i]:
            a *= p[i]
        else:
            b *= p[i]
    ans = min(ans, F(a, b))
print(ans)


### FIXED CODE ###

import math

N = int(input())


def F(a, b):
    a = int(math.log10(a)) + 1
    b = int(math.log10(b)) + 1
    return max(a, b)


ans = float('inf')
for i in range(1, int(math.sqrt(N)) + 1):
    if N % i != 0:
        continue
    a, b = i, N // i
    ans = min(ans, F(a, b))
print(ans)
### BUGGY CODE ###

#!/usr/bin/env python3
import sys
from collections import deque

def solve(N: int, K: int, V: "List[int]"):

    mani = []
    for ac in range(K+1):
        for bc in range(K+1):
            for cc in range(K+1):
                for dc in range(K+1):
                    if (ac+bc+cc+dc) == K:
                        mani.append([ac,bc,cc,dc])

    max_v = 0
    for m in mani:
        VV = deque(V)
        MV = []
        lenVV = len(VV)
        for i in range(min(m[0],lenVV)):
            MV.append(VV.popleft())

        lenVV = len(VV)
        for i in range(min(m[1],lenVV)):
            MV.append(VV.pop())

        MV.sort()
        MV = deque(MV)
        for i in range(m[2]+m[3]):
            if len(MV) > 0 and MV[0] < 0:
                MV.popleft()

        max_v = max(max_v,sum(MV))

    print(max_v)



            



# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    V = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, K, V)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
from collections import deque

def solve(N: int, K: int, V: "List[int]"):

    mani = []
    for ac in range(K+1):
        for bc in range(K+1):
            for cc in range(K+1):
                if (ac+bc+cc) == K:
                    mani.append([ac,bc,cc])

    max_v = 0
    for m in mani:
        VV = deque(V)
        MV = []
        lenVV = len(VV)
        for i in range(min(m[0],lenVV)):
            MV.append(VV.popleft())

        lenVV = len(VV)
        for i in range(min(m[1],lenVV)):
            MV.append(VV.pop())

        MV.sort()
        MV = deque(MV)
        for i in range(m[2]):
            if len(MV) > 0 and MV[0] < 0:
                MV.popleft()

        max_v = max(max_v,sum(MV))

    print(max_v)



            



# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    V = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, K, V)

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

from collections import Counter
n = int(input())
res = list(map(int,input().split()))
sums = 0
ans = []
a = Counter(res)
for i in range(len(res)):
    a[res[i]] -= 1
    sums = 0
    for j in a.values():
        sums += j * (j - 1) // 2
    ans.append(sums)
    a[res[i]] += 1
for k in ans:
    print(k)

### FIXED CODE ###

from collections import Counter
n = int(input())
res = list(map(int,input().split()))
a = Counter(res)

sums = 0

for i in a.values():
    sums +=  i * (i - 1) // 2

for j in res:
    print(sums - a[j] * (a[j] -1) //2 + (a[j]-1) * (a[j] -2 ) // 2)
### BUGGY CODE ###

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

n=int(input())
slist=[''.join(sorted(input())) for i in range(n)]
res=0
for s in set(slist):
    cnt = slist.count(s)
    if cnt > 1:
        res += ncr(cnt,2)
print(res)

### FIXED CODE ###

n=int(input())
sdict={}
cnt=0
for i in range(n):
    s=''.join(sorted(input()))
    if s in sdict:
        sdict[s] += 1
        cnt += sdict[s] - 1
    else:
        sdict[s] = 1
print(cnt)
### BUGGY CODE ###

# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product

def resolve():
    N, M = map(int,input().split())
    A = [int(input()) for _ in range(M)]


    dp = [0]*(N+1)
    dp[0]=1

    for i in range(N):
        if not i+1 in A:
            dp[i + 1] += dp[i]%(10**9+7)
        if i < N - 1 and not i+2 in A:
            dp[i + 2] += dp[i]%(10**9+7)
    print(dp[N]%(10**9+7))



resolve()

### FIXED CODE ###

# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product

def resolve():

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


    dp=[1]*(N+1)
    for i in A:
        dp[i]=0

    for i in range(2,N+1):
        dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)*dp[i]

    print(dp[N])

resolve()
### BUGGY CODE ###

N = int(input())
A = list(map(int, input().split()))
ans = 0
l = []

for k in range(N):
  if A[k] < (10**5)*2:
    l.append([k, A[k]])
    
for i in range(len(l)):
  for j in range(i+1, len(l)):
    if l[j][0]-l[i][0] == l[j][1]+l[i][1]:
      ans += 1
      
print(ans)


### FIXED CODE ###

from collections import defaultdict
 
n = int(input())
a = list(map(int, input().split()))
ap = defaultdict(int)
for i in range(n):
    ap[i - a[i]] += 1

ans= 0
for i in range(n):
    ans += ap[a[i] + i]
print(ans)
### BUGGY CODE ###

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

now_max = 1
for i in range(1, P+1):
    if P % (i ** N) == 0:
        now_max = i
    if P < i ** N:
        break

print(now_max)

### FIXED CODE ###

n, p = map(int, input().split())
if n == 1:
    print(p)
else:
    for i in range(1, round(p**(1/n))+1):
        if p % i**n ==0:
            res = i
    print(res)
### BUGGY CODE ###

n = int(input())

A = []
for i in range(0, n):
    A.append(int(input()))

cnt = 0
def insertion_sort(L, n, g):
    global cnt
    for i in range(g, n):
        v = L[i]
        j = i - g
        while 0 <= j and v < L[j]:
            L[j+g] = L[j]
            j -= g
            cnt += 1
        L[j+g] = v


def shell_sort(L, n):
    global G
    for i in G:
        insertion_sort(L, n, i)

g = []
for i in range(0, 100):
    x = pow(2, i)
    if n < x:
        break
    else:
        g.append(x)

G = list(reversed(g))
B = A[:]
shell_sort(B, n)

print(len(G))
print(' '.join(str(x) for x in G))
print(cnt)
for i in B:
    print(i)

### FIXED CODE ###

import sys
n = int(input())
A = list(map(int, sys.stdin))

cnt = 0
def insertion_sort(L, n, g):
    global cnt
    for i in range(g, n):
        v = L[i]
        j = i - g
        while 0 <= j and v < L[j]:
            L[j+g] = L[j]
            j -= g
            cnt += 1
        L[j+g] = v


def shell_sort(L, n):
    global G
    for i in G:
        insertion_sort(L, n, i)

G = [i for i in [262913, 65921, 16577, 4193, 1073, 281, 77, 23, 8, 1] if i <= n]
shell_sort(A, n)

print(len(G))
print(' '.join(str(x) for x in G))
print(cnt)
for i in A:
    print(i)
### BUGGY CODE ###

n = int(input())
#a = [int(input()) for _ in range(n)]
ans = [-1]
l = 1
for i in range(n):
    a = int(input())
    for j in range(l):
        if ans[j] < a:
            ans[j] = a
            a = -1
            break
    if a != -1:
        ans.append(a)
        l += 1
print(l)

### FIXED CODE ###

import bisect
from collections import deque

n = int(input())
#c = []
c = deque([])
for i in range(n):
    a = int(input())
    if i == 0:
        c.append(a)
    else:
        ind = bisect.bisect_left(c,a)
        if ind > 0:
            c[ind-1] = a
        else:
            c.appendleft(a)

print(len(c))
### BUGGY CODE ###

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

prev = 0
point = 1
for i in range(N):
    if i < K:
        point *= A[i]
    else:
        prev = point
        point *= A[i]
        point /= A[i-K]
        if prev < point:
            print("Yes")
        else:
            print("No")

### FIXED CODE ###

from sys import stdin
readline = stdin.readline

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

prev = 0
point = 1
ans = []
for i in range(N):
    if i >= K:
        if A[i-K] < A[i]:
            ans.append("Yes")
        else:
            ans.append("No")
print(*ans, sep='\n')
### BUGGY CODE ###

def lcm(a):
  from fractions import gcd
  x = a[0]
  for i in range(1, len(a)):
    x = (x * a[i] // gcd(x, a[i]))
  return x

n = int(input())
a = list(map(int, input().split()))
i = 0
mod = 1000000000 + 7
min = lcm(a)
sum = 0
while i < n:
  sum = sum + (min//a[i]) 
  i = i + 1
  
print(sum%mod)



### FIXED CODE ###

from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10**8)

def main():
    n,k = map(int,input().split())
    xy = []
    X = []
    Y = []
    for _ in range(n):
        x,y = map(int,input().split())
        xy.append((x,y))
        X.append(x)
        Y.append(y)
    ans = 10**20
    for i in range(n-1):
        for j in range(i+1,n):
            for a in range(n-1):
                for b in range(a+1,n):
                    xl,xr = X[i],X[j]
                    yd,yu = Y[a],Y[b]
                    if xl > xr:
                        xr,xl = xl,xr
                    if yd > yu:
                        yd,yu = yu,yd
                    area = (xr-xl)*(yu-yd)
                    if ans < area:
                        continue
                    cnt = 0
                    for c in range(n):
                        if xl <= xy[c][0] and xy[c][0] <= xr and yd <= xy[c][1] and xy[c][1] <= yu:
                            cnt += 1
                    if cnt >= k:
                        ans = min(ans,area)
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)

def main():
    n,k = map(int,input().split())
    xy = []
    X = []
    Y = []
    for _ in range(n):
        x,y = map(int,input().split())
        xy.append((x,y))
        X.append(x)
        Y.append(y)
    ans = 10**20
    for i in range(n-1):
        for j in range(i+1,n):
            for a in range(n-1):
                for b in range(a+1,n):
                    xl,xr = X[i],X[j]
                    yd,yu = Y[a],Y[b]
                    if xl > xr:
                        xr,xl = xl,xr
                    if yd > yu:
                        yd,yu = yu,yd
                    area = (xr-xl)*(yu-yd)
                    if ans < area:
                        continue
                    cnt = 0
                    for c in range(n):
                        if xl <= xy[c][0] and xy[c][0] <= xr and yd <= xy[c][1] and xy[c][1] <= yu:
                            cnt += 1
                    if cnt >= k:
                        ans = min(ans,area)
    print(ans)

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

n,x,y = list(map(int,input().split()));

knum = [0]*(n-1);
d = [[0]*(n) for i in range(n)];

for i in range(n) :
    for j in range(i+1,n) :
        d[i][j] = j - i;
        d[j][i] = j - i;

d[x-1][y-1] = 1;
d[y-1][x-1] = 1;

for i in range(n) :
    for j in range(i+1,n) :
        if (i < x and j < x) or (i > y and j > y) :
            continue;
        else :
            mind = min(d[i][j],d[i][x-1]+1+d[y-1][j],d[i][y-1]+1+d[x-1][j]);
            d[i][j] = mind;
            d[j][i] = mind;

for i in range(n) :
    for j in range(i+1,n) :
        knum[d[i][j]-1] += 1;

for i in range(n-1) :
    print(knum[i]);

### FIXED CODE ###

n,x,y = list(map(int,input().split()));

knum = [0]*(n-1);
d = [[0]*(n) for i in range(n)];

for i in range(n) :
    for j in range(i+1,n) :
        d[i][j] = j - i;
        d[j][i] = j - i;

d[x-1][y-1] = 1;
d[y-1][x-1] = 1;

for i in range(n) :
    for j in range(i+1,n) :
        mind = min(d[i][j],d[i][x-1]+1+d[y-1][j],d[i][y-1]+1+d[x-1][j]);
        d[i][j] = mind;
        d[j][i] = mind;

for i in range(n) :
    for j in range(i+1,n) :
        knum[d[i][j]-1] += 1;

for i in range(n-1) :
    print(knum[i]);