Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
class Graph:
    edges = {}

    def append_edge(self, sv, ev, weight = 1):
        if sv in self.edges:
            self.edges[sv].append((ev, weight))
        else:
            self.edges[sv] = [(ev, weight)]

    def bfs(self, sv):
        dist = [-1]*len(self.edges.keys())
        q = deque([])   # キュー
        q.append(sv)
        dist[sv] = 0
        connect_vtxs = []
        while len(q) > 0:
            p = q.popleft()     # キュー取りだし（先頭）
            connect_vtxs.append(p)
            for (ev, w) in self.edges[p]:
                if dist[ev] != -1:
                    continue
                q.append(ev)    # キュー追加
                dist[ev] = dist[p] + 1
        return dist, connect_vtxs


N, X, Y = list(map(int, input().split()))

g = Graph()
for i in range(N - 1):
    g.append_edge(i, i + 1)
    g.append_edge(i + 1, i)
g.append_edge(X - 1, Y - 1)
g.append_edge(Y - 1, X - 1)

dist_cnt = [0]*N
for sv in range(N):
    dist, connect_vtxs = g.bfs(sv)
    for j in range(len(dist)):
        if dist[j] == -1: continue
        dist_cnt[dist[j]] += 1

for i in range(N-1):
    print(int(dist_cnt[i+1]/2))


Fixed submission:
from collections import deque
class Graph:
    edges = {}

    def append_edge(self, sv, ev, weight = 1):
        if sv in self.edges:
            self.edges[sv].append((ev, weight))
        else:
            self.edges[sv] = [(ev, weight)]

    def bfs(self, sv):
        dist = [-1]*len(self.edges.keys())
        q = deque([])   # キュー
        q.append(sv)
        dist[sv] = 0
        connect_vtxs = []
        while len(q) > 0:
            p = q.popleft()     # キュー取りだし（先頭）
            connect_vtxs.append(p)
            for (ev, w) in self.edges[p]:
                if dist[ev] != -1:
                    continue
                q.append(ev)    # キュー追加
                dist[ev] = dist[p] + 1
        return dist, connect_vtxs


N, X, Y = list(map(int, input().split()))

g = Graph()
for i in range(N - 1):
    g.append_edge(i, i + 1)
    g.append_edge(i + 1, i)
g.append_edge(X - 1, Y - 1)
g.append_edge(Y - 1, X - 1)

dist_cnt = [0]*N
for sv in range(N):
    dist, connect_vtxs = g.bfs(sv)
    for j in range(len(dist)):
        if dist[j] == -1: continue
        dist_cnt[dist[j]] += 1

for i in range(N-1):
    print(int(dist_cnt[i+1]/2))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np


from collections import deque
class Graph:
    edges = {}

    def append_edge(self, sv, ev, weight = 1):
        if sv in self.edges:
            self.edges[sv].append((ev, weight))
        else:
            self.edges[sv] = [(ev, weight)]

    def bfs(self, sv):
        dist = np.full(len(self.edges.keys()), -1)
        q = deque([])   # キュー
        q.append(sv)
        dist[sv] = 0
        connect_vtxs = []
        while len(q) > 0:
            p = q.popleft()     # キュー取りだし（先頭）
            connect_vtxs.append(p)
            for (ev, w) in self.edges[p]:
                if dist[ev] != -1:
                    continue
                q.append(ev)    # キュー追加
                dist[ev] = dist[p] + 1
        return dist, connect_vtxs

N, X, Y = list(map(int, input().split()))
g = Graph()
for i in range(N - 1):
    g.append_edge(i, i + 1)
    g.append_edge(i + 1, i)
g.append_edge(X - 1, Y - 1)
g.append_edge(Y - 1, X - 1)
dist_cnt = np.zeros(N)
for sv in range(N):
    dist, connect_vtxs = g.bfs(sv)
    for j in range(dist.shape[0]):
        if dist[j] == -1: continue
        dist_cnt[dist[j]] += 1

for i in range(N-1):
    print(int(dist_cnt[i+1]/2))


Fixed submission:
from collections import deque
class Graph:
    edges = {}

    def append_edge(self, sv, ev, weight = 1):
        if sv in self.edges:
            self.edges[sv].append((ev, weight))
        else:
            self.edges[sv] = [(ev, weight)]

    def bfs(self, sv):
        dist = [-1]*len(self.edges.keys())
        q = deque([])   # キュー
        q.append(sv)
        dist[sv] = 0
        connect_vtxs = []
        while len(q) > 0:
            p = q.popleft()     # キュー取りだし（先頭）
            connect_vtxs.append(p)
            for (ev, w) in self.edges[p]:
                if dist[ev] != -1:
                    continue
                q.append(ev)    # キュー追加
                dist[ev] = dist[p] + 1
        return dist, connect_vtxs


N, X, Y = list(map(int, input().split()))

g = Graph()
for i in range(N - 1):
    g.append_edge(i, i + 1)
    g.append_edge(i + 1, i)
g.append_edge(X - 1, Y - 1)
g.append_edge(Y - 1, X - 1)

dist_cnt = [0]*N
for sv in range(N):
    dist, connect_vtxs = g.bfs(sv)
    for j in range(len(dist)):
        if dist[j] == -1: continue
        dist_cnt[dist[j]] += 1

for i in range(N-1):
    print(int(dist_cnt[i+1]/2))