//import Foundation

struct Nums: Equatable, Hashable {
    var a: [Int]
    init(_ a: Int, _ b: Int, _ c: Int) {
        self.a = [a, b, c]
    }
    static func ==(l: Nums, r: Nums) -> Bool {
        l.a.sorted() == r.a.sorted()
    }
    var pattern: Int {
        if a[0] == a[1], a[1] == a[2] {
            return 1
        } else if a[0] == a[1] || a[1] == a[2] || a[0] == a[2] {
            return 3
        } else {
            return 6
        }
    }
    var sum: Int { a.reduce(0, +) }
    
    func next() -> Set<Nums> {
        return [Nums(a[0]+1, a[1], a[2]), Nums(a[0], a[1]+1, a[2]), Nums(a[0], a[1], a[2]+1)]
    }
    
    func hash(into hasher: inout Hasher) {
        hasher.combine(a.sorted())
    }
    
    func function() -> Int {
        let (x, y, z) = (a[0], a[1], a[2])
        return x*x + y*y + z*z + x*y + y*z + z*x
    }
}

let n = readInt()

var current: Set = [Nums(1, 1, 1)]
var dictionary = [Int : Set<Nums>]()

while current.contains(where: { $0.sum < n }) {
    let c = current
    current = []
    for nums in c {
        dictionary[nums.function(), default: []].insert(nums)
        current.formUnion(nums.next())
    }
}

for i in 1...n {
    print(dictionary[i]?.reduce(0, { $0 + $1.pattern }) ?? 0)
}





//func popcount(_ n: Int) -> Int {
//    String(n, radix: 2).filter { $0 == "1" }.count
//}
//
//func f(n: Int) -> Int {
//    var n = n, res = 0
//    while n != 0 {
//        n %= popcount(n)
//        res += 1
//    }
//    return res
//}
//
//let n = readInt()
//let x = Int.init(readLine()!, radix: 2)!
//for i in 1...n {
//    let xi = x ^ (1 << (n-i))
////    print(xi)
//    print(f(n: xi))
//}


// MARK: -----------------------------------------------------------------------


func readInt() -> Int {
    Int(readLine()!)!
}

func readInts() -> [Int] {
    readLine()!.split(separator: " ").map { Int($0)! }
}

extension Collection {
    func mapToTuple() -> (Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!)
    }
    func mapToTuple() -> (Element, Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!, i.next()!)
    }
    func mapToTuple() -> (Element, Element, Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!, i.next()!, i.next()!)
    }
    
    func safe(at index: Index) -> Element? {
        self.indices.contains(index) ? self[index] : nil
    }
}

struct DP<Argument: Hashable, Element> {
    var dictionary = [Argument: Element]()
    
    var expression: (Argument, (Argument) -> Element) -> Element
    
    init(expression: @escaping (_ argument: Argument, _ note: (Argument) -> Element) -> Element) {
        self.expression = expression
    }
    
    subscript(_ argument: Argument) -> Element {
        mutating _read {
            if let note = dictionary[argument] {
                yield note
            } else {
                let result = expression(argument) { self[$0] }
                dictionary[argument] = result
                yield result
            }
        }
    }
}
