Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque,defaultdict

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

L= [[1]]+[[i-1,i+1] for i in range(1,N-1)]+ [[N-2]]
L[X-1].append(Y-1)
L[Y-1].append(X-1)

def BFS(x,L):
  d=[-1 for _ in range(N)] #距離
  d[x]=0
  v=deque([x])
  
  while len(v)>0:
    a=v.popleft()
    for num in L[a]:
      if d[num]==-1:
        d[num]=d[a]+1
        v.append(num)
  return d

ans=defaultdict(int)

for j in range(N):
  tmp=BFS(j,L)
  #print(tmp)
  for num in tmp:
    ans[num] += 1
    
for k in range(1,N):
  if k in ans:
    print(ans[k]//2)
  else:
    print(0)


Fixed submission:
N,X,Y=map(int,input().split())
cost=[[] for _ in range(N)]

for i in range(N-1):
  cost[i].append(i+1)
for j in range(1,N):
  cost[j].append(j-1)

cost[X-1].append(Y-1)
cost[Y-1].append(X-1)
#print(cost)

def bfs(v):
    d=[-1]*N
    d[v]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in cost[i]:
                if d[j]==-1:
                    d[j]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d

d=dict()
for m in range(N):
  tmp=bfs(m)
  #print(tmp)
  for num in tmp:
    if num not in d:
      d[num]=1
    else:
      d[num] += 1
#print(d)

for z in range(1,N):
  if z in d:
    print(d[z]//2)
  else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

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

L= [[1]]+[[i-1,i+1] for i in range(1,N-1)]+ [[N-2]]
L[X-1].append(Y-1)
L[Y-1].append(X-1)

def BFS(x,L,k):
  cnt=0
  d=[-1 for _ in range(N)] #距離
  d[x]=0
  v=deque([x])
  
  while len(v)>0:
    a=v.popleft()
    for num in L[a]:
      if d[num]==-1:
        d[num]=d[a]+1
        v.append(num)
        if d[num]==k:
          cnt+=1
  return cnt

for k in range(1,N):
  ans=0
  for j in range(N):
    ans+=BFS(j,L,k)
  print(ans//2)

Fixed submission:
N,X,Y=map(int,input().split())
cost=[[] for _ in range(N)]

for i in range(N-1):
  cost[i].append(i+1)
for j in range(1,N):
  cost[j].append(j-1)

cost[X-1].append(Y-1)
cost[Y-1].append(X-1)
#print(cost)

def bfs(v):
    d=[-1]*N
    d[v]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in cost[i]:
                if d[j]==-1:
                    d[j]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d

d=dict()
for m in range(N):
  tmp=bfs(m)
  #print(tmp)
  for num in tmp:
    if num not in d:
      d[num]=1
    else:
      d[num] += 1
#print(d)

for z in range(1,N):
  if z in d:
    print(d[z]//2)
  else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

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

L= [[1]]+[[i-1,i+1] for i in range(1,N-1)]+ [[N-2]]
L[X-1].append(Y-1)
L[Y-1].append(X-1)

def BFS(x,L,k):
  d=[-1 for _ in range(N)] #距離
  d[x]=0
  v=deque([x])
  
  while len(v)>0:
    a=v.popleft()
    for num in L[a]:
      if d[num]==-1:
        d[num]=d[a]+1
        v.append(num)
  else:
    ret=0
    for num in d:
      if num==k:
        ret+=1
    return ret

for k in range(1,N):
  ans=0
  for j in range(N):
    ans+=BFS(j,L,k)
  print(ans//2)

Fixed submission:
N,X,Y=map(int,input().split())
cost=[[] for _ in range(N)]

for i in range(N-1):
  cost[i].append(i+1)
for j in range(1,N):
  cost[j].append(j-1)

cost[X-1].append(Y-1)
cost[Y-1].append(X-1)
#print(cost)

def bfs(v):
    d=[-1]*N
    d[v]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in cost[i]:
                if d[j]==-1:
                    d[j]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d

d=dict()
for m in range(N):
  tmp=bfs(m)
  #print(tmp)
  for num in tmp:
    if num not in d:
      d[num]=1
    else:
      d[num] += 1
#print(d)

for z in range(1,N):
  if z in d:
    print(d[z]//2)
  else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

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

L= [[1]]+[[i-1,i+1] for i in range(1,N-1)]+ [[N-2]]
L[X-1].append(Y-1)
L[Y-1].append(X-1)

def BFS(x,L,k):
  d=[-1 for _ in range(N)] #距離
  d[x]=0
  v=deque([x])
  
  while len(v)>0:
    a=v.popleft()
    for num in L[a]:
      if d[num]==-1:
        d[num]=d[a]+1
        v.append(num)
  else:
    ret=0
    for num in d:
      if num==k:
        ret+=1
    return ret

for k in range(1,N):
  ans=0
  for j in range(N):
    ans+=BFS(j,L,k)
  print(ans//2)

Fixed submission:
N,X,Y=map(int,input().split())
cost=[[] for _ in range(N)]

for i in range(N-1):
  cost[i].append(i+1)
for j in range(1,N):
  cost[j].append(j-1)

cost[X-1].append(Y-1)
cost[Y-1].append(X-1)
#print(cost)

def bfs(v):
    d=[-1]*N
    d[v]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in cost[i]:
                if d[j]==-1:
                    d[j]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d

d=dict()
for m in range(N):
  tmp=bfs(m)
  #print(tmp)
  for num in tmp:
    if num not in d:
      d[num]=1
    else:
      d[num] += 1
#print(d)

for z in range(1,N):
  if z in d:
    print(d[z]//2)
  else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y=map(int,input().split())
cost=[[] for _ in range(N)]

for i in range(N-1):
  cost[i].append(i+1)
for j in range(1,N):
  cost[j].append(j-1)

cost[X-1].append(Y-1)
cost[Y-1].append(X-1)
#print(cost)

def bfs(v):
    d=[-1]*N
    d[v]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in cost[i]:
                if d[j]==-1:
                    d[j]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d

d=dict()
for m in range(N):
  tmp=bfs(m)
  #print(tmp)
  for num in tmp:
    if num not in d:
      d[num]=1
    else:
      d[num] += 1
#print(d)

for z in range(1,N):
  if z in d:
    print(d[z]//2)
  else:
    print(0)

Fixed submission:
N,X,Y=map(int,input().split())
cost=[[] for _ in range(N)]

for i in range(N-1):
  cost[i].append(i+1)
for j in range(1,N):
  cost[j].append(j-1)

cost[X-1].append(Y-1)
cost[Y-1].append(X-1)
#print(cost)

def bfs(v):
    d=[-1]*N
    d[v]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in cost[i]:
                if d[j]==-1:
                    d[j]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d

d=dict()
for m in range(N):
  tmp=bfs(m)
  #print(tmp)
  for num in tmp:
    if num not in d:
      d[num]=1
    else:
      d[num] += 1
#print(d)

for z in range(1,N):
  if z in d:
    print(d[z]//2)
  else:
    print(0)

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

cost=[[float("inf") for i in range(N)] for i in range(N)]
for i in range(N-1):
  cost[i][i+1]=1
  cost[i+1][i]=1  
cost[X-1][Y-1]=1
cost[Y-1][X-1]=1
#print(cost)

def dijkstra(s,n,w,cost):
    #始点sから各頂点への最短距離
    #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
    d = [float("inf")] * n
    used = [False] * n
    d[s] = 0
    
    while True:
        v = -1
        #まだ使われてない頂点の中から最小の距離のものを探す
        for i in range(n):
            if (not used[i]) and (v == -1):
               v = i
            elif (not used[i]) and d[i] < d[v]:
                v = i
        if v == -1:
               break
        used[v] = True
               
        for j in range(n):
               d[j] = min(d[j],d[v]+cost[v][j])
    return d

################################

d=dict()
for i in range(N):
  a = dijkstra(i,N,N,cost)
  for item in a:
    if item in d: 
      d[item] += 1
    else:
      d[item] =1
#print(d)

for j in range(1,N):
  if j in d:
    print(d[j]//2)
  else:
    print(0)

Fixed submission:
N,X,Y=map(int,input().split())
cost=[[] for _ in range(N)]

for i in range(N-1):
  cost[i].append(i+1)
for j in range(1,N):
  cost[j].append(j-1)

cost[X-1].append(Y-1)
cost[Y-1].append(X-1)
#print(cost)

def bfs(v):
    d=[-1]*N
    d[v]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in cost[i]:
                if d[j]==-1:
                    d[j]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d

d=dict()
for m in range(N):
  tmp=bfs(m)
  #print(tmp)
  for num in tmp:
    if num not in d:
      d[num]=1
    else:
      d[num] += 1
#print(d)

for z in range(1,N):
  if z in d:
    print(d[z]//2)
  else:
    print(0)