Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque, defaultdict
n, x, y = map(int, input().split())
inf = 10**10
dp = [[inf]*n for _ in range(n)]
dic = defaultdict(int)
pas = defaultdict(list)

    

for i in range(n):
    l=1
    dp[i][i] = 0
    if i==0 and x==1:
        queue = deque([1, y-1])
        dp[i][1]=1
        dp[i][y-1]=1
        dic[1]+=2
    elif i==0:
        queue = deque([1])
        dp[i][1]=1
        dic[1]+=1
    elif i==n-1 and y==n:
        queue = deque([n-2, x-1])
        dp[i][n-2]=1
        dp[i][x-1]=1
        dic[1]+=2
    elif i==n-1:
        queue = deque([n-2])
        dp[i][n-2]=1
        dic[1]+=1
    elif i==x-1:
        queue = deque([i-1, i+1, y-1])
        dp[i][i+1]=1
        dp[i][i-1]=1
        dp[i][y-1]=1
        dic[1]+=3
    elif i==y-1:
        queue = deque([i-1, i+1, x-1])
        dp[i][i+1]=1
        dp[i][i-1]=1
        dp[i][x-1]=1
        dic[1]+=3
    else:
        queue = deque([i-1, i+1])
        dp[i][i-1]=1
        dp[i][i+1]=1
        dic[1]+=2
    while queue:
        
        t = queue.popleft()
        #dic[]+=1
        if t == x-1 and dp[i][y-1]==inf:
            queue.append(y-1)
            dp[i][y-1]=dp[i][t]+1
            dic[dp[i][t]+1]+=1
        if t == y-1 and dp[i][x-1]==inf:
            queue.append(x-1)
            dp[i][x-1]=dp[i][t]+1
            dic[dp[i][t]+1]+=1
        if not t==0:
            if dp[i][t-1]==inf:
                queue.append(t-1)
                dp[i][t-1]=dp[i][t]+1
                dic[dp[i][t]+1]+=1
        if not t==n-1:
            if dp[i][t+1]==inf:
                queue.append(t+1)
                dp[i][t+1]=dp[i][t]+1
                dic[dp[i][t]+1]+=1

for i in range(1, n):
    print(dic[i]//2)

Fixed submission:
from collections import deque, defaultdict
n, x, y = map(int, input().split())
inf = 10**10
dp = [[inf]*n for _ in range(n)]
dic = defaultdict(int)


    

for i in range(n):
    l=1
    dp[i][i] = 0
    if i==0 and x==1:
        queue = deque([1, y-1])
        dp[i][1]=1
        dp[i][y-1]=1
        dic[1]+=2
    elif i==0:
        queue = deque([1])
        dp[i][1]=1
        dic[1]+=1
    elif i==n-1 and y==n:
        queue = deque([n-2, x-1])
        dp[i][n-2]=1
        dp[i][x-1]=1
        dic[1]+=2
    elif i==n-1:
        queue = deque([n-2])
        dp[i][n-2]=1
        dic[1]+=1
    elif i==x-1:
        queue = deque([i-1, i+1, y-1])
        dp[i][i+1]=1
        dp[i][i-1]=1
        dp[i][y-1]=1
        dic[1]+=3
    elif i==y-1:
        queue = deque([i-1, i+1, x-1])
        dp[i][i+1]=1
        dp[i][i-1]=1
        dp[i][x-1]=1
        dic[1]+=3
    else:
        queue = deque([i-1, i+1])
        dp[i][i-1]=1
        dp[i][i+1]=1
        dic[1]+=2
    while queue:
        
        t = queue.popleft()
        #dic[]+=1
        if t == x-1 and dp[i][y-1]==inf:
            queue.append(y-1)
            dp[i][y-1]=dp[i][t]+1
            dic[dp[i][t]+1]+=1
        if t == y-1 and dp[i][x-1]==inf:
            queue.append(x-1)
            dp[i][x-1]=dp[i][t]+1
            dic[dp[i][t]+1]+=1
        if not t==0:
            if dp[i][t-1]==inf:
                queue.append(t-1)
                dp[i][t-1]=dp[i][t]+1
                dic[dp[i][t]+1]+=1
        if not t==n-1:
            if dp[i][t+1]==inf:
                queue.append(t+1)
                dp[i][t+1]=dp[i][t]+1
                dic[dp[i][t]+1]+=1

for i in range(1, n):
    print(dic[i]//2)