Buggy python submission (verdict: Time Limit Exceeded):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

def main():
    n, x, y = i_map()
    p = [[INF]*n for i in range(n)]
    for i in range(n-1):
        p[i][i] = 0
        p[i][i+1] = p[i+1][i] = 1
    p[-1][-1] = 0

    x -= 1
    y -= 1
    p[x][y] = p[y][x] = 1

    for k in range(n):
        for i in range(n):
            for j in range(n):
                p[i][j] = min(p[i][j], p[i][k] + p[k][j])
    p = list(itertools.chain.from_iterable(p))
    p.sort()
    p = [i for i in p if i != 0]
    start = 1
    cnt = 0
    for i in p:
        if start != i:
            start = i
            print(cnt//2)
            cnt = 1
        else:
            cnt += 1
    print(cnt//2)
    for i in range(n-start-1):
        print(0)


if __name__=="__main__":
    main()


Fixed submission:
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

def main():
    n, x, y = i_map()
    ans = [0] * n

    for fr in range(1, n+1):
        for to in range(fr+1, n+1):
            cost = min(to - fr, abs(x-fr) + abs(to - y) + 1)
            ans[cost] += 1
    print(*ans[1:], sep="\n")

if __name__=="__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

def main():
    n, x, y = i_map()
    p = [[INF]*n for i in range(n)]
    for i in range(n-1):
        p[i][i] = 0
        p[i][i+1] = p[i+1][i] = 1
    p[-1][-1] = 0

    x -= 1
    y -= 1
    p[x][y] = p[y][x] = 1

    for k in range(n):
        for i in range(n):
            for j in range(n):
                p[i][j] = min(p[i][j], p[i][k] + p[k][j])
    p = list(itertools.chain.from_iterable(p))
    for i in range(1,n):
        ans = p.count(i) // 2
        print(ans)









if __name__=="__main__":
    main()


Fixed submission:
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

def main():
    n, x, y = i_map()
    ans = [0] * n

    for fr in range(1, n+1):
        for to in range(fr+1, n+1):
            cost = min(to - fr, abs(x-fr) + abs(to - y) + 1)
            ans[cost] += 1
    print(*ans[1:], sep="\n")

if __name__=="__main__":
    main()