Buggy python submission (verdict: Time Limit Exceeded):
N = int(input().strip())

x, y, z = 1, 1, 1

f = []
for i in range(N+1):
    f.append(set())

# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f, a=0, b=0, c=0, axis=""):
    # print(x, y, z)
    if axis == "":
        ns = [x**2, y**2, z**2, x*y, y*z, x*z]
    elif axis == "x":
        ns = [x**2, a, b, x*y, c, x*z]
    elif axis == "y":
        ns = [a, y**2, b, x*y, y*z, c]
    elif axis == "z":
        ns = [a, b, z**2, c, y*z, x*z]
    else:
        ns = []
    # n = (x+y+z) ** 2 - (x*y + y*z + x*z)
    n = 0
    for i in range(6):
        n += ns[i]

    if n <= N:
        f[n].add("%d-%d-%d" % (x, y, z))
        # print(n, x, y, z)
        f = calc(x+1, y, z, f, a=ns[1], b=ns[2], c=ns[4], axis="x")
        f = calc(x, y+1, z, f, a=ns[0], b=ns[2], c=ns[5], axis="y")
        f = calc(x, y, z+1, f, a=ns[0], b=ns[1], c=ns[3], axis="z")
        return f
    else:
        return f

f = calc(x, y, z, f)
# while True:
#     f = calc(x, y, z, f)
#     f = calc(x+1, y, z, f)
#     f = calc(x, y+1, z, f)
#     f = calc(x, y, z+1, f)
#     f = calc(x+1, y+1, z, f)
#     f = calc(x, y+1, z+1, f)
#     f = calc(x+1, y, z+1, f)
#
#     x += 1
#     y += 1
#     z += 1
#
#     if x**2 + y**2 + z**2 + x*y + y*z + x*z > N:
#         break

for i in range(1, N+1):
    print(f[i].__len__())

Fixed submission:
N = int(input().strip())

x, y, z = 1, 1, 1

f = [0] * (N + 1)

# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f, axis="xyz"):
    # print(x, y, z)
    n = x**2 + y**2 + z**2 + x*y + y*z + x*z

    if n <= N:
        f[n] += 1
        if axis == "xyz":
            f = calc(x+1, y, z, f, axis="xyz")
            f = calc(x, y+1, z, f, axis="yz")
            f = calc(x, y, z+1, f, axis="z")
        elif axis == "yz":
            f = calc(x, y+1, z, f, axis="yz")
            f = calc(x, y, z+1, f, axis="z")
        elif axis == "z":
            f = calc(x, y, z + 1, f, axis="z")
        return f
    else:
        return f

f = calc(x, y, z, f)


for i in range(1, N+1):
    print(f[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input().strip())

x, y, z = 1, 1, 1

f = []
for i in range(N+1):
    f.append(set())

# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f, a=0, b=0, c=0, axis=""):
    # print(x, y, z)
    if axis == "":
        ns = [x**2, y**2, z**2, x*y, y*z, x*z]
    elif axis == "x":
        ns = [x**2, a, b, x*y, c, x*z]
    elif axis == "y":
        ns = [a, y**2, b, x*y, y*z, c]
    elif axis == "z":
        ns = [a, b, z**2, c, y*z, x*z]
    else:
        ns = []
    # n = (x+y+z) ** 2 - (x*y + y*z + x*z)
    n = 0
    for i in range(6):
        n += ns[i]

    if n <= N:
        f[n].add("%d-%d-%d" % (x, y, z))
        # print(n, x, y, z)
        f = calc(x+1, y, z, f, a=ns[1], b=ns[2], c=ns[4], axis="x")
        f = calc(x, y+1, z, f, a=ns[0], b=ns[2], c=ns[5], axis="y")
        f = calc(x, y, z+1, f, a=ns[0], b=ns[1], c=ns[3], axis="z")
        return f
    else:
        return f

f = calc(x, y, z, f)
# while True:
#     f = calc(x, y, z, f)
#     f = calc(x+1, y, z, f)
#     f = calc(x, y+1, z, f)
#     f = calc(x, y, z+1, f)
#     f = calc(x+1, y+1, z, f)
#     f = calc(x, y+1, z+1, f)
#     f = calc(x+1, y, z+1, f)
#
#     x += 1
#     y += 1
#     z += 1
#
#     if x**2 + y**2 + z**2 + x*y + y*z + x*z > N:
#         break

for i in range(1, N+1):
    print(f[i].__len__())

Fixed submission:
N = int(input().strip())

x, y, z = 1, 1, 1

f = [0] * (N + 1)

# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f, axis="xyz"):
    # print(x, y, z)
    n = x**2 + y**2 + z**2 + x*y + y*z + x*z

    if n <= N:
        f[n] += 1
        if axis == "xyz":
            f = calc(x+1, y, z, f, axis="xyz")
            f = calc(x, y+1, z, f, axis="yz")
            f = calc(x, y, z+1, f, axis="z")
        elif axis == "yz":
            f = calc(x, y+1, z, f, axis="yz")
            f = calc(x, y, z+1, f, axis="z")
        elif axis == "z":
            f = calc(x, y, z + 1, f, axis="z")
        return f
    else:
        return f

f = calc(x, y, z, f)


for i in range(1, N+1):
    print(f[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input().strip())

x, y, z = 1, 1, 1

f = []
for i in range(N+1):
    f.append(set())

# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f):
    # print(x, y, z)
    n = x**2 + y**2 + z**2 + x*y + y*z + x*z
    if n <= N:
        f[n].add("%d-%d-%d" % (x, y, z))
        # print(n, x, y, z)
        f = calc(x+1, y, z, f)
        f = calc(x, y+1, z, f)
        f = calc(x, y, z+1, f)
        return f
    else:
        return f

f = calc(x, y, z, f)
# while True:
#     f = calc(x, y, z, f)
#     f = calc(x+1, y, z, f)
#     f = calc(x, y+1, z, f)
#     f = calc(x, y, z+1, f)
#     f = calc(x+1, y+1, z, f)
#     f = calc(x, y+1, z+1, f)
#     f = calc(x+1, y, z+1, f)
#
#     x += 1
#     y += 1
#     z += 1
#
#     if x**2 + y**2 + z**2 + x*y + y*z + x*z > N:
#         break

for i in range(1, N+1):
    print(f[i].__len__())

Fixed submission:
N = int(input().strip())

x, y, z = 1, 1, 1

f = [0] * (N + 1)

# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f, axis="xyz"):
    # print(x, y, z)
    n = x**2 + y**2 + z**2 + x*y + y*z + x*z

    if n <= N:
        f[n] += 1
        if axis == "xyz":
            f = calc(x+1, y, z, f, axis="xyz")
            f = calc(x, y+1, z, f, axis="yz")
            f = calc(x, y, z+1, f, axis="z")
        elif axis == "yz":
            f = calc(x, y+1, z, f, axis="yz")
            f = calc(x, y, z+1, f, axis="z")
        elif axis == "z":
            f = calc(x, y, z + 1, f, axis="z")
        return f
    else:
        return f

f = calc(x, y, z, f)


for i in range(1, N+1):
    print(f[i])