Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y=map(int,input().split())

G=[[i+1] for i in range(N)]
G[N-1].pop()
for i in range(1,N):
    G[i].append(i-1)
G[X-1].append(Y-1)
G[Y-1].append(X-1)

from collections import deque

q=deque([])
cnt=[0]*N

for n in range(N-1):
    seen=[0]*N
    q.append([n,0])
    seen[n]=1
    while q:
        x,c=q.popleft()
        if c>=N-1:continue
        for g in G[x]:
            if seen[g]==0:
                q.append([g,c+1])
                seen[g]=1
                if n<g:
                    cnt[c+1]+=1
for i in range(1,N):
    print(cnt[i])


Fixed submission:
N,X,Y=map(int,input().split())

G=[[i+1] for i in range(N)]
G[N-1].pop()
for i in range(1,N):
    G[i].append(i-1)
G[X-1].append(Y-1)
G[Y-1].append(X-1)

from collections import deque

q=deque([])
cnt=[0]*N

for n in range(N-1):
    seen=[0]*N
    q.append([n,0])
    seen[n]=1
    while q:
        x,c=q.popleft()
        if c>=N-1:continue
        for g in G[x]:
            if seen[g]==0:
                q.append([g,c+1])
                seen[g]=1
                if n<g:
                    cnt[c+1]+=1
for i in range(1,N):
    print(cnt[i])

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y=map(int,input().split())

G=[[] for i in range(N)]
num=[0]*(N-1)

for i in range(N-1):
    G[i].append(i+1)
    G[i+1].append(i)

G[X-1].append(Y-1)
G[Y-1].append(X-1)

from collections import deque
from copy import deepcopy
def BFS(a,b):
    d=deque([])
    d.append([a,[0]*N])
    while d:
        x,c=d.popleft()
        chk=deepcopy(c)
        chk[x]=1
        for i in G[x]:
            if chk[i]==1:continue
            if i==b:
                ans=chk.count(1)
                return ans
            else:
                d.append([i,chk])

for i in range(N-1):
    for j in range(i+1,N):
        n=BFS(i,j)
        num[n-1]+=1

for a in num:
    print(a)








Fixed submission:
N,X,Y=map(int,input().split())

G=[[i+1] for i in range(N)]
G[N-1].pop()
for i in range(1,N):
    G[i].append(i-1)
G[X-1].append(Y-1)
G[Y-1].append(X-1)

from collections import deque

q=deque([])
cnt=[0]*N

for n in range(N-1):
    seen=[0]*N
    q.append([n,0])
    seen[n]=1
    while q:
        x,c=q.popleft()
        if c>=N-1:continue
        for g in G[x]:
            if seen[g]==0:
                q.append([g,c+1])
                seen[g]=1
                if n<g:
                    cnt[c+1]+=1
for i in range(1,N):
    print(cnt[i])

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y=map(int,input().split())

G=[[] for i in range(N)]
num=[0]*(N-1)

for i in range(N-1):
    G[i].append(i+1)
    G[i+1].append(i)

G[X-1].append(Y-1)
G[Y-1].append(X-1)

from collections import deque
from copy import deepcopy
def BFS(a,b):
    d=deque([])
    d.append([a,[0]*N])
    while d:
        x,c=d.popleft()
        chk=deepcopy(c)
        chk[x]=1
        for i in G[x]:
            if chk[i]==1:continue
            if i==b:
                ans=chk.count(1)
                return ans
            else:
                d.append([i,chk])

for i in range(N-1):
    for j in range(i+1,N):
        n=BFS(i,j)
        num[n-1]+=1

for a in num:
    print(a)








Fixed submission:
N,X,Y=map(int,input().split())

G=[[i+1] for i in range(N)]
G[N-1].pop()
for i in range(1,N):
    G[i].append(i-1)
G[X-1].append(Y-1)
G[Y-1].append(X-1)

from collections import deque

q=deque([])
cnt=[0]*N

for n in range(N-1):
    seen=[0]*N
    q.append([n,0])
    seen[n]=1
    while q:
        x,c=q.popleft()
        if c>=N-1:continue
        for g in G[x]:
            if seen[g]==0:
                q.append([g,c+1])
                seen[g]=1
                if n<g:
                    cnt[c+1]+=1
for i in range(1,N):
    print(cnt[i])