Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n,x,y = map(int,input().split())
to = [[] for _ in range(n)]
x -= 1
y -= 1
for i in range(n-1):
    to[i].append(i+1)
    to[i+1].append(i)
to[x].append(y)
to[y].append(x)
ans = [0]*(n-1)
Q = deque()
dist = [-1]*n
for i in range(n):
    Q.clear()
    Q.append(i)
    for j in range(n): dist[j] = -1
    dist[i] = 0
    while Q:
        cur = Q.popleft()
        for nxt in to[cur]:
            if dist[nxt] != -1: continue
            Q.append(nxt)
            dist[nxt] = dist[cur]+1
            ans[dist[cur]] += 1
print("\n".join(map(str,map(lambda x:x//2,ans))))

Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n-1)
x -= 1
y -= 1
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i,abs(x-i)+1+abs(j-y),abs(y-i)+1+abs(j-x))
        ans[dist-1] += 1
print("\n".join(map(str,ans)))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n,x,y = map(int,input().split())
to = [[] for _ in range(n)]
for i in range(n-1):
    to[i].append(i+1)
    to[i+1].append(i)
x -= 1
y -= 1
to[x].append(y)
to[y].append(x)
ans = [0]*(n-1)
dist = [-1]*n
Q = deque()
for i in range(n):
    Q.clear()
    for j in range(n): dist[j] = -1
    Q.append((i,-1))
    dist[i] = 0
    while Q:
        cur,prev = Q.popleft()
        for nxt in to[cur]:
            if nxt == prev: continue
            if dist[nxt] != -1: continue
            Q.append((nxt,cur))
            dist[nxt] = dist[cur]+1
            ans[dist[cur]] += 1

print("\n".join(map(str,(map(lambda x:x//2,ans)))))

Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n-1)
x -= 1
y -= 1
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i,abs(x-i)+1+abs(j-y),abs(y-i)+1+abs(j-x))
        ans[dist-1] += 1
print("\n".join(map(str,ans)))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
import sys
input = sys.stdin.readline
n,x,y = map(int,input().split())
to = [[] for _ in range(n)]
for i in range(n-1):
    to[i].append(i+1)
    to[i+1].append(i)
x -= 1
y -= 1
to[x].append(y)
to[y].append(x)

ans = [0]*(n-1)
d = {}
Q = deque()
flag = [False]*n
for i in range(n-1):
    Q.clear()
    Q.append((i,-1,0))
    for j in range(n): flag[j] = False
    flag[i] = True
    while Q:
        cur,prev,dist = Q.popleft()
        for nxt in to[cur]:
            if nxt == prev: continue
            if flag[nxt]: continue
            flag[nxt] = True
            if (i,nxt) not in d: ans[dist] += 1
            Q.append((nxt,cur,dist+1))
            d[(i,nxt)] = 1
            d[(nxt,i)] = 1

for i in range(n-1): print(ans[i])

Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n-1)
x -= 1
y -= 1
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i,abs(x-i)+1+abs(j-y),abs(y-i)+1+abs(j-x))
        ans[dist-1] += 1
print("\n".join(map(str,ans)))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
import sys
input = sys.stdin.readline
n,x,y = map(int,input().split())
to = [[] for _ in range(n)]
for i in range(n-1):
    to[i].append(i+1)
    to[i+1].append(i)
x -= 1
y -= 1
to[x].append(y)
to[y].append(x)

ans = [0]*(n-1)
d = {}
for i in range(n-1):
    Q = deque()
    Q.append((i,-1,0))
    flag = [False]*n
    flag[i] = True
    while Q:
        cur,prev,dist = Q.popleft()
        for nxt in to[cur]:
            if nxt == prev: continue
            if flag[nxt]: continue
            flag[nxt] = True
            if (i,nxt) not in d: ans[dist] += 1
            Q.append((nxt,cur,dist+1))
            d[(i,nxt)] = 1
            d[(nxt,i)] = 1

print("\n".join(map(str,ans)))

Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n-1)
x -= 1
y -= 1
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i,abs(x-i)+1+abs(j-y),abs(y-i)+1+abs(j-x))
        ans[dist-1] += 1
print("\n".join(map(str,ans)))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n,x,y = map(int,input().split())
to = [[] for _ in range(n)]
for i in range(n-1):
    to[i].append(i+1)
    to[i+1].append(i)
x -= 1
y -= 1
to[x].append(y)
to[y].append(x)

ans = [0]*(n-1)
d = {}
for i in range(n-1):
    Q = deque()
    Q.append((i,-1,0))
    flag = [False]*n
    while Q:
        cur,prev,dist = Q.popleft()
        flag[i] = True
        for nxt in to[cur]:
            if nxt == prev: continue
            if flag[nxt]: continue
            flag[nxt] = True
            if (i,nxt) not in d: ans[dist] += 1
            Q.append((nxt,cur,dist+1))
            d[(i,nxt)] = 1
            d[(nxt,i)] = 1

print("\n".join(map(str,ans)))

Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n-1)
x -= 1
y -= 1
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i,abs(x-i)+1+abs(j-y),abs(y-i)+1+abs(j-x))
        ans[dist-1] += 1
print("\n".join(map(str,ans)))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n,x,y = map(int,input().split())
to = [[] for _ in range(n)]
for i in range(n-1):
    to[i].append(i+1)
    to[i+1].append(i)
x -= 1
y -= 1
to[x].append(y)
to[y].append(x)

ans = [0]*(n-1)
d = {}
for i in range(n-1):
    Q = deque()
    Q.append((i,-1,0))
    flag = [False]*n
    while Q:
        cur,prev,dist = Q.popleft()
        flag[i] = True
        for nxt in to[cur]:
            if nxt == prev: continue
            if flag[nxt]: continue
            flag[nxt] = True
            if (i,nxt) not in d: ans[dist] += 1
            Q.append((nxt,cur,dist+1))
            d[(i,nxt)] = 1
            d[(nxt,i)] = 1

print("\n".join(map(str,ans)))

Fixed submission:
n,x,y = map(int,input().split())
ans = [0]*(n-1)
x -= 1
y -= 1
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i,abs(x-i)+1+abs(j-y),abs(y-i)+1+abs(j-x))
        ans[dist-1] += 1
print("\n".join(map(str,ans)))