import heapq





def dijkstra(s):

    color=["white" for _ in range(n)]

    D=[inf for _ in range(n)]



    M=[[] for _ in range(n)]

    for i in range(n-1):

        M[i].append((1,i+1))

        M[i+1].append((1,i))

    M[x-1].append((1,y-1))

    M[y-1].append((1,x-1))



    D[s]=0



    H=[(0,s)]

    heapq.heapify(H)



    while len(H)>=1:

        u=heapq.heappop(H)[1]

        if color[u]=="black":continue

        color[u]="black"



        V=[(i,j) for i,j in M[u] if color[j]!="black"]

        while len(V)!=0:

            for i,j in V:

                if D[u]+i<D[j]:

                    D[j]=D[u]+i

                    color[j]="gray"

                    heapq.heappush(H,(D[j],j))

            break

    return D





inf=10**7

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



A=[0]*n

for i in range(n):

    for j in dijkstra(i)[:i]:

        A[j] +=1



for i in A[1:]:

    print(i)
import sys

from collections import deque

sys.setrecursionlimit(10**7)

inf=10**7





def BFS(s):

    color=["white" for _ in range(n)]

    D=[inf for _ in range(n)]



    color[s-1]="gray"

    D[s-1]=0

    queue=deque([s-1])



    while len(queue)!=0:

        u=queue.popleft()

        for i in M[u]:

            if color[i]=="white":

                color[i]="gray"

                D[i]=D[u]+1

                queue.append(i)

        color[u]="black"



    return D





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



M=[[] for _ in range(n)]

for i in range(n-1):

    M[i].append(i+1)

    M[i+1].append(i)

M[x-1].append(y-1)

M[y-1].append(x-1)



C=[0]*n

for i in range(n):

    for j in BFS(i+1)[i:]:

        C[j] +=1



for i in C[1:]:

    print(i)
import heapq


def dijkstra(s):
    color = ["white" for _ in range(n)]
    D = [inf for _ in range(n)]
    M = [[] for _ in range(n)]
    for i in range(n - 1):
        M[i].append((1, i + 1))
        M[i + 1].append((1, i))
    M[x - 1].append((1, y - 1))
    M[y - 1].append((1, x - 1))
    D[s] = 0
    H = [(0, s)]
    heapq.heapify(H)
    while len(H) >= 1:
        u = heapq.heappop(H)[1]
        if color[u] == "black":
            continue
        color[u] = "black"
        V = [(i, j) for i, j in M[u] if color[j] != "black"]
        while len(V) != 0:
            for i, j in V:
                if D[u] + i < D[j]:
                    D[j] = D[u] + i
                    color[j] = "gray"
                    heapq.heappush(H, (D[j], j))
            break
    return D


inf = 10**7
n, x, y = list(map(int, input().split()))
A = [0] * n
for i in range(n):
    for j in dijkstra(i)[:i]:
        A[j] += 1
for i in A[1:]:
    print(i)

import sys
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**7


def BFS(s):
    color = ["white" for _ in range(n)]
    D = [inf for _ in range(n)]
    color[s - 1] = "gray"
    D[s - 1] = 0
    queue = deque([s - 1])
    while len(queue) != 0:
        u = queue.popleft()
        for i in M[u]:
            if color[i] == "white":
                color[i] = "gray"
                D[i] = D[u] + 1
                queue.append(i)
        color[u] = "black"
    return D


n, x, y = list(map(int, input().split()))
M = [[] for _ in range(n)]
for i in range(n - 1):
    M[i].append(i + 1)
    M[i + 1].append(i)
M[x - 1].append(y - 1)
M[y - 1].append(x - 1)
C = [0] * n
for i in range(n):
    for j in BFS(i + 1)[i:]:
        C[j] += 1
for i in C[1:]:
    print(i)

-import heapq +import sys +from collections import deque + +sys.setrecursionlimit(10**7) +inf = 10**7 -def dijkstra(s): +def BFS(s): -    M = [[] for _ in range(n)] -    for i in range(n - 1): -        M[i].append((1, i + 1)) -        M[i + 1].append((1, i)) -    M[x - 1].append((1, y - 1)) -    M[y - 1].append((1, x - 1)) -    D[s] = 0 -    H = [(0, s)] -    heapq.heapify(H) -    while len(H) >= 1: -        u = heapq.heappop(H)[1] -        if color[u] == "black": -            continue +    color[s - 1] = "gray" +    D[s - 1] = 0 +    queue = deque([s - 1]) +    while len(queue) != 0: +        u = queue.popleft() +        for i in M[u]: +            if color[i] == "white": +                color[i] = "gray" +                D[i] = D[u] + 1 +                queue.append(i) -        V = [(i, j) for i, j in M[u] if color[j] != "black"] -        while len(V) != 0: -            for i, j in V: -                if D[u] + i < D[j]: -                    D[j] = D[u] + i -                    color[j] = "gray" -                    heapq.heappush(H, (D[j], j)) -            break -inf = 10**7 -A = [0] * n +M = [[] for _ in range(n)] +for i in range(n - 1): +    M[i].append(i + 1) +    M[i + 1].append(i) +M[x - 1].append(y - 1) +M[y - 1].append(x - 1) +C = [0] * n -    for j in dijkstra(i)[:i]: -        A[j] += 1 -for i in A[1:]: +    for j in BFS(i + 1)[i:]: +        C[j] += 1 +for i in C[1:]: