Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
DATA = """
10 4 8
""".split("\n")

def get_debug_line():
	for i in DATA:
		yield i

if 1:
	get_line = input
else:
	get_line = get_debug_line().__next__
	get_line()

N, X, Y = [int(i) for i in get_line().strip().split(" ")]
X-=1
Y-=1
INF = 10 * 20
m = [[0] * N for _ in range(N)]
tt = [0] * N

#print(ret)
#print(len(ret))

for r in range(N):
	for c in range(r+1, N):
		m[r][c] = c - r
		#m[c][r] = m[r][c]
		tt[m[r][c]] += 1
		m[c][r] = m[r][c]

def Set(r, c, v):
	tt[m[r][c]] -= 1
	m[r][c] = v
	tt[m[r][c]] += 1

for r in range(N):
	if m[r][X] < m[r][Y]:
		Set(r, Y, m[r][X]+1)
	for c in range(Y+1, N):
		if m[r][c] <= m[r][c-1]:
			break
		Set(r, c, m[r][c-1]+1)
	for c in range(Y-1, X, -1):
		if m[r][c] <= m[r][c+1]:
			break
		Set(r,c, m[r][c+1]+1)

for t in tt[1:]:
	print (t)

Fixed submission:
# coding: utf-8
DATA = """
10 4 8
""".split("\n")

def get_debug_line():
	for i in DATA:
		yield i

if 1:
	get_line = input
else:
	get_line = get_debug_line().__next__
	get_line()

N, X, Y = [int(i) for i in get_line().strip().split(" ")]
X-=1
Y-=1
INF = 10 * 20
m = [[0] * N for _ in range(N)]
tt = [0] * N

#print(ret)
#print(len(ret))

for r in range(N):
	for c in range(r+1, N):
		m[r][c] = c - r
		#m[c][r] = m[r][c]
		tt[m[r][c]] += 1
		m[c][r] = m[r][c]

def Set(r, c, v):
	if m[r][c] < v:
		return False
	else:
		tt[m[r][c]] -= 1
		m[r][c] = v
		tt[m[r][c]] += 1
		return True

for r in range(N):
	if not Set(r, Y, m[r][X]+1):
		continue
	for c in range(Y+1, N):
		if not Set(r, c, m[r][c-1]+1):
			break
	for c in range(Y-1, X, -1):
		if not Set(r,c, m[r][c+1]+1):
			break

for t in tt[1:]:
	print (t)

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
DATA = """
10 4 8
""".split("\n")

def get_debug_line():
	for i in DATA:
		yield i

if 1:
	get_line = input
else:
	get_line = get_debug_line().__next__
	get_line()

N, X, Y = [int(i) for i in get_line().strip().split(" ")]
X-=1
Y-=1
INF = 10 **15
m = [[INF] * N for _ in range(N)]

ret = []
for i in range(N-1):
	m[i][i+1] = 1
	m[i+1][i] = 1
	ret.append((i, i+1))
ret.append((X, Y))
m[X][Y] = 1
m[Y][X] = 1

#print(ret)
#print(len(ret))

tt = [0] * N
for _ in range(N):
	tt2 = [0] * N
	for r in range(N):
		for c in range(r+1, N):
			if r == c:
				continue
			for k in range(N):
				m[r][c] = min(m[r][c], m[r][k] + m[k][c])
			#m[c][r] = m[r][c]
			if not m[c][r] == INF:
				tt2[m[r][c]] += 1
			m[c][r] = m[r][c]
	if tt2 == tt:
		break
	tt = tt2

# for i in m:
# 	print (i)

for t in tt[1:]:
	print (t)

Fixed submission:
# coding: utf-8
DATA = """
10 4 8
""".split("\n")

def get_debug_line():
	for i in DATA:
		yield i

if 1:
	get_line = input
else:
	get_line = get_debug_line().__next__
	get_line()

N, X, Y = [int(i) for i in get_line().strip().split(" ")]
X-=1
Y-=1
INF = 10 * 20
m = [[0] * N for _ in range(N)]
tt = [0] * N

#print(ret)
#print(len(ret))

for r in range(N):
	for c in range(r+1, N):
		m[r][c] = c - r
		#m[c][r] = m[r][c]
		tt[m[r][c]] += 1
		m[c][r] = m[r][c]

def Set(r, c, v):
	if m[r][c] < v:
		return False
	else:
		tt[m[r][c]] -= 1
		m[r][c] = v
		tt[m[r][c]] += 1
		return True

for r in range(N):
	if not Set(r, Y, m[r][X]+1):
		continue
	for c in range(Y+1, N):
		if not Set(r, c, m[r][c-1]+1):
			break
	for c in range(Y-1, X, -1):
		if not Set(r,c, m[r][c+1]+1):
			break

for t in tt[1:]:
	print (t)