Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

cnt = 0
k = []
for i in range(1, n + 1):
    x = 1
    while x ** 2 < n:
        y = 1
        s_x = x ** 2
        while y ** 2 < n:
            z = 1
            s_y = y ** 2
            while z ** 2 < n:
                if s_x + s_y + z ** 2 + x * y + y * z + z * x == i:
                    cnt += 1

                z += 1
            y += 1
        x += 1
    print(cnt)
    cnt = 0
# print(k)


Fixed submission:
n = int(input())
ans = [0] * n
cnt = 0
k = []
x = 1
while x ** 2 < n:
    y = 1
    s_x = x ** 2
    while y ** 2 < n:
        z = 1
        s_y = y ** 2
        while z ** 2 < n:
            ans_tmp = s_x + s_y + z ** 2 + x * y + y * z + z * x
            if ans_tmp <= n:
                ans[ans_tmp - 1] += 1
            cnt += 1
            z += 1
        y += 1
    x += 1

for i in range(n):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

cnt = 0
k = []
for i in range(1, n + 1):
    x = 1
    while x ** 2 < n:
        y = 1
        while x ** 2 + y ** 2 < n:
            z = 1
            while x ** 2 + y ** 2 + z ** 2 < n:
                if x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x == i:
                    p = [x, y, z]
                    p = sorted(p)
                    s = set(p)

                    if p in k:
                        z += 1
                        continue
                    # print(x, y, z)
                    k.append(p)
                    if len(s) == 1:
                        cnt += 1
                    elif len(s) == 2:
                        cnt += 3
                    else:
                        cnt += 6

                z += 1
            y += 1
        x += 1
    print(cnt)
    cnt = 0
# print(k)

Fixed submission:
n = int(input())
ans = [0] * n
cnt = 0
k = []
x = 1
while x ** 2 < n:
    y = 1
    s_x = x ** 2
    while y ** 2 < n:
        z = 1
        s_y = y ** 2
        while z ** 2 < n:
            ans_tmp = s_x + s_y + z ** 2 + x * y + y * z + z * x
            if ans_tmp <= n:
                ans[ans_tmp - 1] += 1
            cnt += 1
            z += 1
        y += 1
    x += 1

for i in range(n):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

cnt = 0
k = []
for i in range(1, n + 1):
    x = 1
    while x ** 2 < n:
        y = 1
        while x ** 2 + y ** 2 < n:
            z = 1
            while x ** 2 + y ** 2 + z ** 2 < n:
                if x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x == i:
                    p = [x, y, z]
                    p = sorted(p)
                    s = set(p)

                    if p in k:
                        z += 1
                        continue
                    # print(x, y, z)
                    k.append(p)
                    if len(s) == 1:
                        cnt += 1
                    elif len(s) == 2:
                        cnt += 3
                    else:
                        cnt += 6

                z += 1
            y += 1
        x += 1
    print(cnt)
    cnt = 0
# print(k)

Fixed submission:
n = int(input())
ans = [0] * n
cnt = 0
k = []
x = 1
while x ** 2 < n:
    y = 1
    s_x = x ** 2
    while y ** 2 < n:
        z = 1
        s_y = y ** 2
        while z ** 2 < n:
            ans_tmp = s_x + s_y + z ** 2 + x * y + y * z + z * x
            if ans_tmp <= n:
                ans[ans_tmp - 1] += 1
            cnt += 1
            z += 1
        y += 1
    x += 1

for i in range(n):
    print(ans[i])