Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int,input().split())
from collections import defaultdict as ddict
ans = ddict(int)
for n in range(N):
    for i in range(n+1,N):
        s = i+1
        d = n+1
        p1 = abs(s-d)
        p2 = abs(s-X)+abs(d-Y)+1
        p3 = abs(s-Y)+abs(d-X)+1
        ans[min(p1,p2,p3)] += 1
for n in range(1,N):
    print(ans[n])


Fixed submission:
N,X,Y = map(int,input().split())
from collections import defaultdict as ddict
ans = ddict(int)
for n in range(N):
    for i in range(n+1,N):
        s = i+1
        d = n+1
        p1 = abs(s-d)
        p2 = abs(s-X)+abs(d-Y)+1
        p3 = abs(s-Y)+abs(d-X)+1
        ans[min(p1,p2,p3)] += 1
for n in range(1,N):
    print(ans[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int,input().split())
matrix = [[0 for n in range(0,N)] for nn in range(0,N)]
for n in range(N):
    for i in range(n+1,N):
        s = i+1
        d = n+1
        p1 = abs(s-d)
        p2 = abs(s-X)+abs(d-Y)+1
        p3 = abs(s-Y)+abs(d-X)+1
        matrix[n][i] = min(p1,p2,p3)
matrix_flatten = sum(matrix,[])
for n in range(1,N):
    print(matrix_flatten.count(n))

Fixed submission:
N,X,Y = map(int,input().split())
from collections import defaultdict as ddict
ans = ddict(int)
for n in range(N):
    for i in range(n+1,N):
        s = i+1
        d = n+1
        p1 = abs(s-d)
        p2 = abs(s-X)+abs(d-Y)+1
        p3 = abs(s-Y)+abs(d-X)+1
        ans[min(p1,p2,p3)] += 1
for n in range(1,N):
    print(ans[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int,input().split())
from collections import defaultdict as ddict
G = ddict(list)
for n in range(1,N):
    G[n].append(n+1)
    G[n+1].append(n)
G[X].append(Y)
G[Y].append(X)
def check(A):
    ret = True
    for a in A:
        if a == 0:
            ret = False
    return ret
from collections import deque
matrix = [[0 for n in range(0,N+1)] for nn in range(0,N+1)]
for i in range(1,N+1):
    Q = deque([i])
    pre_matrix = [0 for i in range(0,N+1)]
    while Q:
        q = Q.popleft()
        for c in G[q]:
            if matrix[i][c] == 0 or matrix[i][c] > matrix[i][q]+1:
                matrix[i][c] = matrix[i][q]+1
                matrix[c][i] = matrix[i][q]+1
            Q.append(c)
        if check(matrix[i][1:]):
            break
ans = ddict(int)
for i in range(1,N+1):
    for ii in range(i+1,N+1):
        ans[matrix[i][ii]] += 1
for n in range(1,N):
    print(ans[n])

Fixed submission:
N,X,Y = map(int,input().split())
from collections import defaultdict as ddict
ans = ddict(int)
for n in range(N):
    for i in range(n+1,N):
        s = i+1
        d = n+1
        p1 = abs(s-d)
        p2 = abs(s-X)+abs(d-Y)+1
        p3 = abs(s-Y)+abs(d-X)+1
        ans[min(p1,p2,p3)] += 1
for n in range(1,N):
    print(ans[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int,input().split())
from collections import defaultdict as ddict
G = ddict(list)
for n in range(1,N):
    G[n].append(n+1)
    G[n+1].append(n)
G[X].append(Y)
G[Y].append(X)
def check(A):
    ret = True
    for a in A:
        if a == 0:
            ret = False
    return ret
from collections import deque
matrix = [[0 for n in range(0,N+1)] for nn in range(0,N+1)]
for i in range(1,N+1):
    Q = deque([i])
    pre_matrix = [0 for i in range(0,N+1)]
    while Q:
        q = Q.popleft()
        for c in G[q]:
            if matrix[i][c] == 0 or matrix[i][c] > matrix[i][q]+1:
                matrix[i][c] = matrix[i][q]+1
                matrix[c][i] = matrix[i][q]+1
            Q.append(c)
        if check(matrix[i][1:]):
            break
ans = ddict(int)
for i in range(1,N+1):
    for ii in range(i+1,N+1):
        ans[matrix[i][ii]] += 1
for n in range(1,N):
    print(ans[n])

Fixed submission:
N,X,Y = map(int,input().split())
from collections import defaultdict as ddict
ans = ddict(int)
for n in range(N):
    for i in range(n+1,N):
        s = i+1
        d = n+1
        p1 = abs(s-d)
        p2 = abs(s-X)+abs(d-Y)+1
        p3 = abs(s-Y)+abs(d-X)+1
        ans[min(p1,p2,p3)] += 1
for n in range(1,N):
    print(ans[n])