Buggy python submission (verdict: Time Limit Exceeded):
def main():
    import sys
    input = sys.stdin.readline
    from collections import deque
    n,x,y = map(int,input().split())
    ans = [0]*(n)
    E = [[] for i in range(n)]
    E[0].append(1)
    E[n-1].append(n-2)
    for i in range(1,n-1):
        E[i].append(i-1)
        E[i].append(i+1)
    E[x-1].append(y-1)
    E[y-1].append(x-1)
    ans = [0]*(n)
    def search(x):
        d = [float("INF")]*n
        d[x] = 0
        q = deque([])
        q.append((x,0))
        while q:
            bef,l = q.pop()

            for nex in E[bef]:
                if d[nex] > l+1:
                    d[nex] = l+1
                    q.append((nex,l+1))
        
        d = d[x:]
        for j in range(n):
            ans[j] += d.count(j)
    for i in range(n-1):
        search(i)

    for i in ans[1:]:
        print(i)
if __name__ == "__main__":
    main()



Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n)

for i in range(1,n):
    for j in range(i+1,n+1):
        d = min(j-i,abs(x-i)+abs(y-j)+1)
        ans[d] += 1
for i in ans[1:]:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    import sys
    input = sys.stdin.readline
    from collections import deque
    n,x,y = map(int,input().split())
    ans = [0]*(n)
    E = [[] for i in range(n)]
    E[0].append(1)
    E[n-1].append(n-2)
    for i in range(1,n-1):
        E[i].append(i-1)
        E[i].append(i+1)
    E[x-1].append(y-1)
    E[y-1].append(x-1)
    ans = [0]*(n)
    def search(x):
        d = [float("INF")]*n
        d[x] = 0
        q = deque([])
        q.append((x,0))
        while q:
            bef,l = q.pop()

            for nex in E[bef]:
                if d[nex] > l+1:
                    d[nex] = l+1
                    q.append((nex,l+1))
        
        d = d[x:]
        for j in range(n):
            ans[j] += d.count(j)
    for i in range(n-1):
        search(i)

    for i in ans[1:]:
        print(i)
if __name__ == "__main__":
    main()



Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n)

for i in range(1,n):
    for j in range(i+1,n+1):
        d = min(j-i,abs(x-i)+abs(y-j)+1)
        ans[d] += 1
for i in ans[1:]:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    from collections import deque
    n,x,y = map(int,input().split())
    ans = [0]*(n)
    E = [[] for i in range(n)]
    E[0].append(1)
    E[n-1].append(n-2)
    for i in range(1,n-1):
        E[i].append(i-1)
        E[i].append(i+1)
    E[x-1].append(y-1)
    E[y-1].append(x-1)
    ans = [0]*(n)
    def search(x):
        d = [float("INF")]*n
        d[x] = 0
        q = deque([])
        q.append((x,0))
        while q:
            bef,l = q.popleft()

            for nex in E[bef]:
                if d[nex] > l+1:
                    d[nex] = l+1
                    q.append((nex,l+1))
        
        d = d[x:]
        for j in range(n):
            ans[j] += d.count(j)
    for i in range(n-1):
        search(i)

    for i in ans[1:]:
        print(i)
if __name__ == "__main__":
    main()



Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n)

for i in range(1,n):
    for j in range(i+1,n+1):
        d = min(j-i,abs(x-i)+abs(y-j)+1)
        ans[d] += 1
for i in ans[1:]:
    print(i)