Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
#定数
#3≦n≦2*10^3
n, x, y = map(int, input().split())

#答えの計算
A = [0 for i in range(n)]   #Answers
for i in range(n):  #O(n)
    Q = deque([i])  #Queue BFSのためのもの
    #Record 位置iからの距離を記録
    R = [-1 for i in range(n)]  
    R[i] = 0
    #BFS O(n)
    while len(Q) != 0:
        t = Q[0]    #target
        d = R[t]    #distance(target)
        Q.popleft()
        #Queueに値を入れるとともに距離を更新する
        def push_and_record(t:int, d:int):
            if R[t] < 0:
                R[t] = d
                Q.append(t)
            else:
                pass
        #+方向
        if t < n-1:
            push_and_record(t+1, d+1)
        else:
            pass
        #-方向
        if t > 0:
            push_and_record(t-1, d+1)
        else: 
            pass
        #xとy
        if t == x-1:
            push_and_record(y-1, d+1)
        elif t == y-1:
            push_and_record(x-1, d+1)
        else:
            pass
    #Ansに距離の結果を入れる
    for i in range(n):
        A[R[i]] += 1

#答えの出力
for i in range(1, n):
    print(A[i] // 2)    #組み合わせ

Fixed submission:
from collections import deque
n, x, y = map(int, input().split())

def push(v, d):
    if Dist[v] == -1:   #距離未更新
        Dist[v] = d
        Queue.append(v)
    else:   #距離が更新済み
        pass
    return 0
    
Ans = [0] * n
for i in range(n):
    Queue = deque([i])
    Dist = [-1] * n
    Dist[i] = 0 
    while len(Queue) != 0:
        v = Queue[0]
        d = Dist[v]
        #辺を通して次の頂点へ

        #-方向
        if v-1 >= 0:
            push(v-1, d+1)
        else:
            pass

        #+方向
        if v+1 < n:
            push(v+1, d+1)
        else:
            pass

        #XとYの間
        if v == x-1 :
            push(y-1, d+1)
        elif v == y-1:
            push(x-1, d+1)
        else:
            pass
        Queue.popleft()
    for i in Dist:
        Ans[i] += 1

for i in range(len(Ans)):
    Ans[i] *= 0.5

for i in range(1, n):
    print(int(Ans[i]))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n, x, y = map(int, input().split())

def push(v, d):
    if Dist[v] == -1:   #距離未更新
        Dist[v] = d
        Queue.append(v)
    else:   #距離が更新済み
        pass
    return 0
    
Ans = [0] * n
for i in range(n):
    Queue = deque([i])
    Dist = [-1] * n
    Dist[i] = 0 
    while len(Queue) != 0:
        v = Queue[0]
        d = Dist[v]
        #辺を通して次の頂点へ

        #-方向
        if v-1 >= 0:
            push(v-1, d+1)
        else:
            pass

        #+方向
        if v+1 < n:
            push(v+1, d+1)
        else:
            pass

        #XとYの間
        if v == x-1 :
            push(y-1, d+1)
        elif v == y-1:
            push(x-1, d+1)
        else:
            pass
        Queue.popleft()
    for i in Dist:
        Ans[i] += 1

for i in range(len(Ans)):
    Ans[i] *= 0.5

for i in range(1, n):
    print(int(Ans[i]))




Fixed submission:
from collections import deque
n, x, y = map(int, input().split())

def push(v, d):
    if Dist[v] == -1:   #距離未更新
        Dist[v] = d
        Queue.append(v)
    else:   #距離が更新済み
        pass
    return 0
    
Ans = [0] * n
for i in range(n):
    Queue = deque([i])
    Dist = [-1] * n
    Dist[i] = 0 
    while len(Queue) != 0:
        v = Queue[0]
        d = Dist[v]
        #辺を通して次の頂点へ

        #-方向
        if v-1 >= 0:
            push(v-1, d+1)
        else:
            pass

        #+方向
        if v+1 < n:
            push(v+1, d+1)
        else:
            pass

        #XとYの間
        if v == x-1 :
            push(y-1, d+1)
        elif v == y-1:
            push(x-1, d+1)
        else:
            pass
        Queue.popleft()
    for i in Dist:
        Ans[i] += 1

for i in range(len(Ans)):
    Ans[i] *= 0.5

for i in range(1, n):
    print(int(Ans[i]))