Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, x, y = map(int, input().split())

v = [x-1]
u = [y-1]
for i in range(n-1):
    v.append(i)
    u.append(i+1)

csr = csr_matrix(([1]*n, (v, u)), shape=(n, n))
result = shortest_path(csr, method='D', directed=False)

for k in range(1, n):
    answer = np.sum(result==k) // 2
    print(answer)

Fixed submission:
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, x, y = map(int, input().split())

v = [x-1]
u = [y-1]
for i in range(n-1):
    v.append(i)
    u.append(i+1)

csr = csr_matrix(([1]*n, (v, u)), shape=(n, n))
result = shortest_path(csr, method='D', directed=False).astype(int)
ans = np.bincount(result.ravel(), minlength=n) // 2
print(*ans[1:], sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, x, y = map(int, input().split())

matrix = [[0]*n for _ in range(n)]

for i in range(n-1):
    matrix[i][i+1] = 1
    matrix[i+1][i] = 1

matrix[x-1][y-1] = 1
matrix[y-1][x-1] = 1

matrix = np.array(matrix)
csr = csr_matrix(matrix)
result = shortest_path(csr, method='D')

for k in range(1, n):
    answer = np.sum(result==k) // 2
    print(answer)

Fixed submission:
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, x, y = map(int, input().split())

v = [x-1]
u = [y-1]
for i in range(n-1):
    v.append(i)
    u.append(i+1)

csr = csr_matrix(([1]*n, (v, u)), shape=(n, n))
result = shortest_path(csr, method='D', directed=False).astype(int)
ans = np.bincount(result.ravel(), minlength=n) // 2
print(*ans[1:], sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from scipy.sparse.csgraph import shortest_path

n, x, y = map(int, input().split())

matrix = [[0]*n for _ in range(n)]

for i in range(n-1):
    matrix[i][i+1] = 1
    matrix[i+1][i] = 1

matrix[x-1][y-1] = 1
matrix[y-1][x-1] = 1

matrix = np.array(matrix)
result = shortest_path(matrix, method='D')

for k in range(1, n):
    answer = np.sum(result==k) // 2
    print(answer)

Fixed submission:
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, x, y = map(int, input().split())

v = [x-1]
u = [y-1]
for i in range(n-1):
    v.append(i)
    u.append(i+1)

csr = csr_matrix(([1]*n, (v, u)), shape=(n, n))
result = shortest_path(csr, method='D', directed=False).astype(int)
ans = np.bincount(result.ravel(), minlength=n) // 2
print(*ans[1:], sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from scipy.sparse.csgraph import shortest_path

n, x, y = map(int, input().split())

matrix = [[0]*n for _ in range(n)]

for i in range(n-1):
    matrix[i][i+1] = 1
    matrix[i+1][i] = 1


matrix[x-1][y-1] = 1
matrix[y-1][x-1] = 1

matrix = np.array(matrix)

result = shortest_path(matrix)

for k in range(1, n):
    answer = np.sum(result==k) // 2
    print(answer)

Fixed submission:
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, x, y = map(int, input().split())

v = [x-1]
u = [y-1]
for i in range(n-1):
    v.append(i)
    u.append(i+1)

csr = csr_matrix(([1]*n, (v, u)), shape=(n, n))
result = shortest_path(csr, method='D', directed=False).astype(int)
ans = np.bincount(result.ravel(), minlength=n) // 2
print(*ans[1:], sep='\n')