Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict,deque
class Graph(object):
  def __init__(self):
    self.graph = defaultdict(list)

  def addEdge(self, u, v):
    self.graph[u].append(v)
    self.graph[v].append(u)

  def search(self, v, searched):
    visited = [False] * len(self.graph)

    visited[v] = True
    queue = deque([(v,0)])
    while queue:
      s,d = queue.popleft()
      k = lambda x,y: (min(x,y),max(x,y))
      s_ = [(i,d+1) for i in self.graph[s] if not visited[i] and d+1<=searched[k(v,i)]]
      queue.extend(s_)
      for i,_ in s_:
        visited[i] = True
        searched[k(v,i)] = min(searched[k(v,i)], d+1)
        
def main():
  g = Graph()
  N,X,Y = map(int, input().split())
  for i in range(N-1): g.addEdge(i,i+1)
  g.addEdge(X-1,Y-1)
  ans = [0]*(N-1)
  searched = defaultdict(lambda :2*10**3)
  for i in range(N-1): g.search(i, searched)
  for v in searched.values(): ans[v-1] += 1
  for i in ans: print(i)
  
main()

Fixed submission:
from itertools import combinations
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for a,b in combinations(range(N),2):
  c = min([abs(a-b), abs(X-1-a)+abs(Y-1-b)+1, abs(Y-1-a)+abs(X-1-b)+1])
  ans[c-1] += 1
for i in ans: print(i)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for a,b in combinations(range(N),2):
    c = min([abs(a-b), abs(X-1-a)+abs(Y-1-b)+1, abs(Y-1-a)+abs(X-1-b)+1])
    ans[c-1] += 1
print("\n".join([str(i) for i in ans]))

Fixed submission:
from itertools import combinations
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for a,b in combinations(range(N),2):
  c = min([abs(a-b), abs(X-1-a)+abs(Y-1-b)+1, abs(Y-1-a)+abs(X-1-b)+1])
  ans[c-1] += 1
for i in ans: print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for i in range(1,N):
  for j in range(1,N+1-i):
    a, b = j,j+i
    c = min([abs(a-b), abs(X-a)+abs(Y-b)+1, abs(Y-a)+abs(X-b)+1])
    ans[c-1] += 1
print("\n".join([str(i) for i in ans]))

Fixed submission:
from itertools import combinations
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for a,b in combinations(range(N),2):
  c = min([abs(a-b), abs(X-1-a)+abs(Y-1-b)+1, abs(Y-1-a)+abs(X-1-b)+1])
  ans[c-1] += 1
for i in ans: print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int, input().split())
n = list(range(1,N+1))
ans = {i: 0 for i in range(1,N)}
for i in range(1,N):
  for a,b in zip(n[:-i], n[i:]):
    c = min([abs(b-a), abs(X-a)+abs(Y-b)+1, abs(Y-a)+abs(X-b)+1])
    ans[c] += 1
print("\n".join([str(ans[i]) for i in range(1,N)]))

Fixed submission:
from itertools import combinations
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for a,b in combinations(range(N),2):
  c = min([abs(a-b), abs(X-1-a)+abs(Y-1-b)+1, abs(Y-1-a)+abs(X-1-b)+1])
  ans[c-1] += 1
for i in ans: print(i)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict,deque
class Graph(object):
  def __init__(self):
    self.graph = defaultdict(list)

  def addEdge(self, u, v):
    self.graph[u].append(v)
    self.graph[v].append(u)

  def search(self, v, searched):
    visited = [False] * len(self.graph)

    visited[v] = True
    queue = deque([(v,0)])
    while queue:
      s,d = queue.popleft()
      k = lambda x,y: (min(x,y),max(x,y))
      s_ = [(i,d+1) for i in self.graph[s] if not visited[i] and d+1<=searched[k(v,i)]]
      queue.extend(s_)
      for i,_ in s_:
        visited[i] = True
        searched[k(v,i)] = min(searched[k(v,i)], d+1)
        
def main():
  g = Graph()
  N,X,Y = map(int, input().split())
  for i in range(N-1): g.addEdge(i,i+1)
  g.addEdge(X-1,Y-1)
  ans = defaultdict(int)
  searched = defaultdict(lambda :2*10**3)
  for i in range(N-1): g.search(i, searched)
  for v in searched.values(): ans[v] += 1
  print("\n".join([str(ans[i]) for i in range(1,N)]))
  
main()

Fixed submission:
from itertools import combinations
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for a,b in combinations(range(N),2):
  c = min([abs(a-b), abs(X-1-a)+abs(Y-1-b)+1, abs(Y-1-a)+abs(X-1-b)+1])
  ans[c-1] += 1
for i in ans: print(i)

Buggy python submission (verdict: Time Limit Exceeded):
# Reference: 
#   https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/?ref=lbp
#   https://www.geeksforgeeks.org/breadth-first-search-or-bfs-for-a-graph/?ref=lbp

from collections import defaultdict,deque

class Graph(object):
  def __init__(self):
    self.graph = defaultdict(list)

  def addEdge(self, u, v):
    self.graph[u].append(v)
    self.graph[v].append(u)

  def search(self, v, searched, ns):
    visited = [False] * len(self.graph)

    visited[v] = True
    queue = deque([(v,0)])
    while queue:
      s,d = queue.popleft()
      k = lambda x,y: (min(x,y),max(x,y))
      s_ = [(i,d+1) for i in self.graph[s] if not visited[i]]
      queue.extend(s_)
      for i,_ in s_:
        visited[i] = True
        searched[k(v,i)] = min(searched[k(v,i)], d+1)
        
def main():
  g = Graph()
  N,X,Y = map(int, input().split())
  for i in range(N-1): g.addEdge(i,i+1)
  g.addEdge(X-1,Y-1)
  ans = defaultdict(int)
  searched = defaultdict(lambda :2*10**3)
  for i in range(N-1): g.search(i, searched, ans)
  for v in searched.values(): ans[v] += 1
  for i in range(1,N): print(ans[i])
  
main()

Fixed submission:
from itertools import combinations
N,X,Y = map(int, input().split())
ans = [0]*(N-1)
for a,b in combinations(range(N),2):
  c = min([abs(a-b), abs(X-1-a)+abs(Y-1-b)+1, abs(Y-1-a)+abs(X-1-b)+1])
  ans[c-1] += 1
for i in ans: print(i)