Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

N,X,Y = map(int,readline().split())
G = [[] for i in range(N)]

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)

ans = [0] * N

from collections import deque
for i in range(N):
  q = deque([])
  q.append([i, -1, 0])
  seen = set()
  while q:
    v, parent,cost = q.popleft()
    if v in seen:
      continue
    seen.add(v)
    ans[cost] += 1
    for child in G[v]:
      if child == parent:
        continue
      q.append([child, i, cost + 1])
      
for i in range(1, N):
  print(ans[i] // 2)


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

E=[[] for i in range(N)]

for i in range(N-1):
  E[i].append(i+1)
  E[i+1].append(i)
  
E[X-1].append(Y-1)
E[Y-1].append(X-1)

INF=10**4

ans=[0 for i in range(N)]
from collections import deque
for i in range(N):
  score=[INF for i in range(N)]
  q=deque([[i,0]])
  while q:
    v,dist=q.pop()
    if score[v]>dist:
      score[v]=dist
    else:
      continue
    for child in E[v]:
      q.append([child,dist+1])
  for s in score:
    ans[s]+=1
    
for i in range(1,N):
  print(ans[i]//2)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

N,X,Y = map(int,readline().split())

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

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

from collections import deque
for st in range(N):
  q = deque([[st,0,-1]])
  visited = set()
  while q:
    v,dist,parent = q.popleft()
    if v in visited:
      continue
    visited.add(v)
    ans[dist] += 1
    for child in G[v]:
      if child == parent:
        continue
      q.append([child, dist + 1, v])
    
for i in range(1, N):
  print(ans[i] // 2)

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

E=[[] for i in range(N)]

for i in range(N-1):
  E[i].append(i+1)
  E[i+1].append(i)
  
E[X-1].append(Y-1)
E[Y-1].append(X-1)

INF=10**4

ans=[0 for i in range(N)]
from collections import deque
for i in range(N):
  score=[INF for i in range(N)]
  q=deque([[i,0]])
  while q:
    v,dist=q.pop()
    if score[v]>dist:
      score[v]=dist
    else:
      continue
    for child in E[v]:
      q.append([child,dist+1])
  for s in score:
    ans[s]+=1
    
for i in range(1,N):
  print(ans[i]//2)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

N,X,Y = map(int,readline().split())

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

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

from collections import deque
for st in range(N):
  q = deque([[st,0]])
  visited = set()
  while q:
    v,dist = q.popleft()
    if v in visited:
      continue
    visited.add(v)
    ans[dist] += 1
    for child in G[v]:
      q.append([child, dist + 1])
    
for i in range(1, N):
  print(ans[i] // 2)

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

E=[[] for i in range(N)]

for i in range(N-1):
  E[i].append(i+1)
  E[i+1].append(i)
  
E[X-1].append(Y-1)
E[Y-1].append(X-1)

INF=10**4

ans=[0 for i in range(N)]
from collections import deque
for i in range(N):
  score=[INF for i in range(N)]
  q=deque([[i,0]])
  while q:
    v,dist=q.pop()
    if score[v]>dist:
      score[v]=dist
    else:
      continue
    for child in E[v]:
      q.append([child,dist+1])
  for s in score:
    ans[s]+=1
    
for i in range(1,N):
  print(ans[i]//2)

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

E=[[] for i in range(N)]

for i in range(N-1):
  E[i].append(i+1)
  E[i+1].append(i)
  
E[X-1].append(Y-1)
E[Y-1].append(X-1)

INF=10**4

ans=[0 for i in range(N)]
from collections import deque
for i in range(N):
  score=[INF for i in range(N)]
  q=deque([[i,0]])
  while q:
    v,dist=q.pop()
    if score[v]>dist:
      score[v]=dist
    else:
      continue
    for child in E[v]:
      q.append([child,dist+1])
  for s in score:
    ans[s]+=1
    
for i in range(1,N):
  print(ans[i]//2)
    


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

E=[[] for i in range(N)]

for i in range(N-1):
  E[i].append(i+1)
  E[i+1].append(i)
  
E[X-1].append(Y-1)
E[Y-1].append(X-1)

INF=10**4

ans=[0 for i in range(N)]
from collections import deque
for i in range(N):
  score=[INF for i in range(N)]
  q=deque([[i,0]])
  while q:
    v,dist=q.pop()
    if score[v]>dist:
      score[v]=dist
    else:
      continue
    for child in E[v]:
      q.append([child,dist+1])
  for s in score:
    ans[s]+=1
    
for i in range(1,N):
  print(ans[i]//2)