Buggy python submission (verdict: Time Limit Exceeded):
import queue
def main():
    n, x, y = map(int, input().split())
    x -= 1
    y -= 1
    ans = [0]*n
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
    q = queue.Queue()
    for i in range(n):
        f = [True]*n
        f[i] = False
        q.put([i, 0])
        while not q.empty():
            a, b = q.get()
            for v in t[a]:
                if 0 < v and v < n:
                    if f[v]:
                        if i < v:
                            ans[b + 1] += 1
                        f[v] = False
                        if i < v or (i <= (x+y+1)//2 and x <= v):
                            q.put([v, b+1])
    for i in range(1, n):
        print(ans[i])
if __name__ == "__main__":
    main()

Fixed submission:
import queue
def main():
    n, x, y = map(int, input().split())
    x -= 1
    y -= 1
    ans = [0]*n
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
    for i in range(n):
        for j in range(i+1, n):
            if j <= x:
                ans[j-i] += 1
            elif j <= y:
                buf = min(j-i, abs(i-x) + 1 + (y-j))
                ans[buf] += 1
            else:
                buf = min(y-i, abs(x-i)+1)
                ans[buf + (j-y)] += 1
    for i in range(1, n):
        print(ans[i])
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import queue
def main():
    n, x, y = map(int, input().split())
    x -= 1
    y -= 1
    ans = [[0]*n for _ in range(n)]
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
    q = queue.Queue()
    for i in range(n):
        f = [True]*n
        f[i] = False
        q.put([i, 0])
        while not q.empty():
            a, b = q.get()
            for v in t[a]:
                if 0 < v and v < n:
                    if f[v]:
                        if i < v:
                            ans[i][b + 1] += 1
                        f[v] = False
                        if i < v or (i <= (x+y+1)//2 and x <= v):
                            q.put([v, b+1])
    for i in range(1, n):
        p = 0
        for j in range(n):
            p += ans[j][i]
        print(p)
if __name__ == "__main__":
    main()

Fixed submission:
import queue
def main():
    n, x, y = map(int, input().split())
    x -= 1
    y -= 1
    ans = [0]*n
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
    for i in range(n):
        for j in range(i+1, n):
            if j <= x:
                ans[j-i] += 1
            elif j <= y:
                buf = min(j-i, abs(i-x) + 1 + (y-j))
                ans[buf] += 1
            else:
                buf = min(y-i, abs(x-i)+1)
                ans[buf + (j-y)] += 1
    for i in range(1, n):
        print(ans[i])
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import queue
def main():
    n, x, y = map(int, input().split())
#    odd = True
#    if (x+y)%2 == 0:
#        odd = False
#    for q in range(1, n):
#        ans = 0
#        for i in range(1, n):
#            if i <= x:
#                if i + q <= x:
#                    ans += 1
#                else:
#                    buf = i + q - x
#                    if 1 < buf and buf <= n-y + 1:
#                        ans += 1
#                    if buf <= (y-x+1)//2:
#                        if buf == (y-x+1)//2:
#                            if odd:
#                                ans += 2
#                            else:
#                                ans += 1
#                        else:
#                            ans += 2
#            elif i <= y:
#                if q <= (y-x + 1)//2:
    x -= 1
    y -= 1
    ans = [[0]*n for _ in range(n)]
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
#    print(t)
    q = queue.Queue()
    for i in range(n):
        f = [True]*n
        f[i] = False
        q.put([i, 0])
        while not q.empty():
            a, b = q.get()
            for v in t[a]:
                if 0 < v and v < n:
                    if f[v]:
                        if i < v:
                            ans[i][b + 1] += 1
                        f[v] = False
                        q.put([v, b+1])
    for i in range(1, n):
        p = 0
        for j in range(n):
            p += ans[j][i]
        print(p)
if __name__ == "__main__":
    main()

Fixed submission:
import queue
def main():
    n, x, y = map(int, input().split())
    x -= 1
    y -= 1
    ans = [0]*n
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
    for i in range(n):
        for j in range(i+1, n):
            if j <= x:
                ans[j-i] += 1
            elif j <= y:
                buf = min(j-i, abs(i-x) + 1 + (y-j))
                ans[buf] += 1
            else:
                buf = min(y-i, abs(x-i)+1)
                ans[buf + (j-y)] += 1
    for i in range(1, n):
        print(ans[i])
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import queue
def main():
    n, x, y = map(int, input().split())
#    odd = True
#    if (x+y)%2 == 0:
#        odd = False
#    for q in range(1, n):
#        ans = 0
#        for i in range(1, n):
#            if i <= x:
#                if i + q <= x:
#                    ans += 1
#                else:
#                    buf = i + q - x
#                    if 1 < buf and buf <= n-y + 1:
#                        ans += 1
#                    if buf <= (y-x+1)//2:
#                        if buf == (y-x+1)//2:
#                            if odd:
#                                ans += 2
#                            else:
#                                ans += 1
#                        else:
#                            ans += 2
#            elif i <= y:
#                if q <= (y-x + 1)//2:
    x -= 1
    y -= 1
    ans = [[0]*n for _ in range(n)]
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
#    print(t)
    q = queue.Queue()
    for i in range(n):
        f = [True]*n
        f[i] = False
        q.put([i, 0])
        while not q.empty():
            a, b = q.get()
            for v in t[a]:
                if 0 < v and v < n:
                    if f[v]:
                        if i < v:
                            ans[i][b + 1] += 1
                        f[v] = False
                        q.put([v, b+1])
    for i in range(1, n):
        p = 0
        for j in range(n):
            p += ans[j][i]
        print(p)
if __name__ == "__main__":
    main()

Fixed submission:
import queue
def main():
    n, x, y = map(int, input().split())
    x -= 1
    y -= 1
    ans = [0]*n
    t = [[i+1, i-1] for i in range(n)]
    t[x].append(y)
    t[y].append(x)
    for i in range(n):
        for j in range(i+1, n):
            if j <= x:
                ans[j-i] += 1
            elif j <= y:
                buf = min(j-i, abs(i-x) + 1 + (y-j))
                ans[buf] += 1
            else:
                buf = min(y-i, abs(x-i)+1)
                ans[buf + (j-y)] += 1
    for i in range(1, n):
        print(ans[i])
if __name__ == "__main__":
    main()