Problem:


Score : 300 points

Problem Statement

Let f(n) be the number of triples of integers (x,y,z) that satisfy both of the following conditions:

1 \leq x,y,z

x^2 + y^2 + z^2 + xy + yz + zx = n

Given an integer N, find each of f(1),f(2),f(3),\ldots,f(N).

Constraints

All values in input are integers.

1 \leq N \leq 10^4

Input

Input is given from Standard Input in the following format:

N

Output

Print N lines. The i-th line should contain the value f(i).

Sample Input 1

20

Sample Output 1

0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0

For n=6, only (1,1,1) satisfies both of the conditions. Thus, f(6) = 1.

For n=11, three triples, (1,1,2), (1,2,1), and (2,1,1), satisfy both of the conditions. Thus, f(6) = 3.

For n=17, three triples, (1,2,2), (2,1,2), and (2,2,1), satisfy both of the conditions. Thus, f(17) = 3.

For n=18, three triples, (1,1,3), (1,3,1), and (3,1,1), satisfy both of the conditions. Thus, f(18) = 3.



Sample input:
20


Sample output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0

Submission status: Wrong Answer

Solution code:
ans = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0, 3, 3, 6, 0, 0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0, 0, 0, 3, 0, 0, 1, 6, 0, 6, 6, 0, 0, 6, 0, 0, 0, 0, 3, 3, 3, 6, 0, 6, 3, 6, 0, 0, 0, 6, 0, 0, 0, 3, 3, 9, 0, 6, 3, 6, 
0, 3, 6, 0, 0, 0, 0, 6, 1, 6, 0, 6, 6, 0, 3, 12, 0, 6, 0, 0, 3, 6, 0, 0, 0, 3, 3, 12, 0, 6, 3, 6, 0, 3, 6, 9, 0, 6, 0, 0, 0, 3, 6, 3, 3, 6, 0, 6, 3, 12, 0, 3, 6, 6, 0, 6, 0, 6, 3, 6, 0, 0, 1, 6, 3, 12, 6, 0, 0, 12, 0, 6, 0, 6, 6, 12,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 18, 6, 18, 0, 6, 0, 12, 0, 6, 12, 6, 3, 18, 0, 6, 6, 6, 6, 15, 3, 24, 0, 6, 3, 18, 0, 12, 6, 12, 6, 24, 0, 15, 18, 9, 6, 0, 0, 18, 3, 6, 0, 15, 12, 12, 6, 6, 0, 18, 0, 6, 3, 12, 0, 12, 6, 6, 9, 9, 6, 24, 3, 24, 0, 9, 12, 6, 6, 12, 0, 
12, 0, 21, 9, 15, 6, 12, 3, 18, 3, 12, 6, 12, 6, 0, 0, 12, 0, 12, 6, 24, 0, 6, 12, 6, 1, 9, 6, 12, 6, 24, 0, 18, 3, 12, 6, 6, 12, 24, 0, 12, 6, 15, 6, 18, 0, 18, 0, 0, 0, 18, 9, 21, 12, 0, 6, 18, 0, 9, 6, 6, 6, 12, 0, 12, 0, 9, 9, 27, 6, 6, 3, 18, 6, 21, 6, 6, 12, 12, 0, 12, 0, 24, 12, 0, 0, 24, 3, 24, 6, 12, 12, 18, 0, 0, 0, 12, 0, 18, 3, 15, 6, 12, 9, 6, 0, 15, 6, 9, 12, 24, 0, 12, 3, 6, 6, 21, 6, 18, 3, 18, 0, 21, 12, 15, 6, 6, 0, 12, 3, 12, 9, 18, 9, 12, 6, 6, 6, 24, 0, 18, 3, 24, 0, 6, 6, 0, 6, 9, 6, 6, 4, 30, 0, 
18, 12, 9, 6, 24, 0, 18, 0, 9, 12, 21, 6, 6, 12, 12, 0, 18, 0, 21, 15, 12, 0, 12, 6, 12, 12, 18, 0, 18, 0, 6, 0, 9, 12, 18, 6, 30, 0, 0, 0, 24, 6, 9, 3, 12, 6, 30, 3, 6, 12, 6, 12, 12, 0, 36, 0, 6, 3, 27, 12, 12, 6, 6, 6, 24, 0, 12, 6, 12, 0, 18, 0, 18, 15, 18, 
3, 18, 6, 12, 6, 6, 12, 3, 6, 6, 0, 12, 3, 39, 3, 12, 12, 12, 3, 18, 0, 21, 12, 21, 6, 18, 0, 12, 0, 9, 9, 12, 9, 24, 9, 12, 6, 12, 6, 33, 0, 6, 0, 18, 0, 9, 15, 12, 6, 24, 6, 6, 3, 15, 6, 15, 12, 18, 0, 18, 1, 18, 6, 12, 6, 6, 0, 24, 6, 24, 12, 18, 6, 24, 0, 6, 6, 12, 15, 24, 0, 24, 6, 6, 0, 18, 0, 15, 18, 12, 0, 24, 0, 12, 6, 12, 12, 18, 6, 24, 0, 0, 6, 24, 3, 12, 0, 12, 6, 30, 9, 6, 12, 24, 12, 12, 0, 15, 18, 12, 0, 18, 0, 24, 6, 15, 6, 18, 3, 18, 3, 12, 6, 24, 12, 12, 12, 6, 0, 36, 0, 18, 3, 6, 12, 6, 9, 12, 0, 3, 
12, 36, 0, 30, 0, 12, 0, 18, 6, 12, 9, 12, 6, 24, 3, 18, 12, 15, 9, 24, 0, 18, 6, 18, 9, 18, 12, 6, 6, 24, 3, 24, 0, 12, 12, 12, 0, 6, 0, 27, 12, 18, 3, 30, 3, 18, 6, 0, 12, 15, 6, 18, 0, 24, 0, 9, 6, 9, 12, 18, 7, 24, 0, 24, 12, 15, 12, 24, 0, 24, 0, 6, 9, 30, 
9, 6, 6, 0, 9, 33, 12, 36, 0, 12, 0, 18, 0, 6, 21, 12, 6, 36, 6, 0, 3, 18, 6, 12, 6, 24, 0, 12, 3, 24, 6, 9, 12, 6, 6, 30, 6, 18, 12, 9, 9, 12, 0, 30, 3, 18, 3, 27, 6, 30, 12, 12, 0, 24, 0, 27, 12, 6, 0, 24, 3, 18, 18, 9, 6, 18, 0, 12, 3, 33, 18, 12, 9, 6, 0, 12, 6, 30, 0, 24, 12, 12, 0, 30, 6, 6, 6, 0, 6, 24, 0, 12, 0, 18, 15, 33, 6, 30, 15, 18, 0, 9, 12, 24, 9, 12, 0, 18, 6, 27, 18, 15, 6, 18, 3, 24, 0, 6, 6, 36, 12, 18, 0, 12, 3, 30, 3, 12, 6, 12, 15, 6, 0, 18, 12, 15, 9, 30, 0, 18, 6, 12, 12, 18, 6, 6, 3, 24, 1, 27, 12, 18, 6, 18, 0, 24, 0, 18, 15, 15, 21, 30, 6, 12, 12, 18, 0, 30, 6, 24, 0, 6, 0, 18, 6, 36, 12, 6, 6, 36, 0, 6, 12, 12, 12, 24, 0, 30, 0, 9, 6, 18, 0, 18, 12, 12, 6, 24, 6, 9, 15, 12, 0, 12, 6, 30, 9, 18, 0, 42, 3, 18, 6, 12, 18, 33, 12, 12, 0, 18, 0, 21, 12, 12, 12, 24, 6, 30, 0, 27, 18, 6, 12, 6, 0, 24, 0, 18, 15, 30, 0, 18, 12, 6, 0, 21, 6, 21, 12, 24, 0, 30, 0, 6, 6, 6, 12, 24, 0, 30, 12, 9, 12, 21, 3, 24, 0, 12, 3, 21, 18, 9, 18, 18, 6, 30, 3, 42, 6, 21, 6, 30, 0, 6, 3, 24, 9, 36, 6, 6, 9, 12, 6, 18, 12, 33, 9, 12, 0, 24, 9, 9, 6, 3, 18, 36, 6, 18, 0, 24, 6, 6, 6, 18, 0, 12, 0, 30, 3, 39, 12, 12, 7, 18, 0, 15, 18, 18, 9, 36, 0, 24, 6, 6, 18, 30, 0, 18, 9, 18, 3, 24, 6, 21, 12, 24, 0, 30, 3, 33, 24, 12, 6, 18, 6, 6, 6, 18, 6, 18, 12, 18, 0, 24, 6, 36, 3, 18, 6, 0, 12, 30, 0, 9, 24, 18, 0, 24, 0, 18, 0, 0, 12, 30, 15, 30, 6, 18, 3, 30, 0, 24, 18, 12, 0, 36, 3, 24, 12, 15, 18, 18, 6, 24, 3, 24, 12, 18, 12, 24, 0, 0, 6, 39, 6, 24, 3, 18, 3, 42, 6, 12, 12, 15, 9, 30, 0, 12, 0, 18, 6, 18, 12, 24, 15, 12, 0, 12, 12, 30, 12, 12, 0, 18, 0, 15, 15, 18, 18, 30, 3, 24, 12, 9, 6, 48, 0, 18, 0, 30, 0, 21, 6, 12, 12, 24, 12, 18, 3, 48, 24, 6, 6, 18, 0, 36, 0, 12, 15, 27, 6, 12, 12, 18, 6, 27, 6, 12, 9, 18, 0, 24, 6, 18, 18, 21, 0, 36, 0, 12, 0, 18, 12, 21, 18, 24, 0, 12, 1, 18, 9, 21, 18, 6, 9, 
42, 3, 36, 12, 12, 12, 30, 0, 12, 6, 21, 12, 36, 6, 24, 9, 12, 6, 12, 12, 24, 12, 18, 0, 42, 0, 15, 6, 15, 15, 42, 6, 30, 6, 12, 12, 18, 12, 18, 0, 6, 6, 36, 0, 30, 18, 6, 0, 6, 0, 30, 18, 18, 0, 42, 0, 18, 6, 15, 18, 24, 0, 12, 6, 36, 9, 33, 12, 12, 12, 18, 0, 
36, 0, 21, 21, 15, 18, 18, 15, 18, 0, 18, 6, 42, 6, 24, 0, 18, 3, 42, 6, 18, 12, 12, 12, 18, 0, 15, 12, 18, 12, 36, 0, 30, 12, 3, 21, 18, 0, 30, 6, 24, 0, 27, 12, 18, 12, 6, 0, 12, 0, 36, 15, 15, 3, 36, 12, 18, 6, 30, 6, 33, 12, 12, 0, 12, 6, 24, 6, 54, 18, 12, 
3, 36, 9, 9, 12, 12, 18, 36, 0, 6, 0, 21, 15, 27, 9, 24, 12, 30, 6, 24, 6, 27, 18, 12, 0, 30, 0, 21, 12, 18, 6, 30, 0, 18, 0, 21, 18, 21, 6, 30, 0, 24, 3, 6, 6, 15, 27, 12, 10, 42, 6, 36, 12, 12, 6, 24, 0, 24, 6, 12, 12, 48, 6, 18, 12, 0, 3, 51, 6, 30, 6, 24, 0, 24, 0, 30, 21, 15, 12, 24, 9, 18, 6, 18, 12, 30, 9, 24, 0, 18, 0, 27, 18, 9, 6, 18, 9, 54, 0, 18, 24, 21, 18, 12, 0, 24, 0, 12, 0, 30, 9, 30, 12, 6, 9, 24, 6, 15, 15, 18, 0, 30, 3, 33, 18, 21, 12, 42, 3, 30, 6, 6, 24, 27, 6, 12, 0, 24, 3, 42, 6, 42, 9, 12, 6, 18, 6, 24, 12, 12, 12, 54, 0, 6, 12, 18, 6, 18, 18, 30, 12, 30, 0, 18, 0, 27, 18, 24, 0, 18, 0, 15, 24, 21, 6, 24, 3, 36, 6, 6, 6, 45, 21, 18, 0, 18, 6, 33, 3, 18, 0, 24, 15, 30, 0, 30, 24, 12, 6, 36, 0, 24, 3, 21, 24, 18, 15, 30, 3, 12, 6, 42, 12, 12, 12, 6, 0, 
54, 6, 30, 15, 24, 18, 24, 6, 12, 0, 9, 6, 30, 0, 48, 0, 24, 0, 15, 12, 39, 12, 24, 6, 24, 6, 15, 30, 12, 6, 24, 0, 24, 3, 24, 9, 24, 6, 6, 18, 12, 4, 54, 6, 21, 18, 18, 0, 36, 6, 24, 9, 30, 12, 24, 9, 36, 6, 12, 18, 42, 3, 30, 0, 6, 9, 21, 6, 12, 30, 30, 6, 30, 0, 27, 12, 9, 18, 30, 0, 36, 0, 12, 9, 42, 6, 24, 12, 0, 6, 51, 12, 24, 12, 12, 0, 18, 6, 12, 18, 6, 6, 36, 3, 54, 9, 18, 6, 27, 12, 18, 0, 30, 0, 39, 9, 18, 18, 12, 9, 30, 6, 21, 12, 24, 18, 24, 0, 12, 0, 39, 12, 42, 6, 24, 15, 18, 0, 24, 12, 45, 12, 6, 0, 54, 0, 15, 21, 6, 6, 30, 6, 18, 12, 24, 18, 30, 6, 36, 0, 12, 3, 24, 12, 18, 18, 18, 12, 24, 0, 33, 12, 21, 6, 42, 0, 18, 6, 9, 15, 24, 6, 24, 6, 12, 6, 18, 6, 33, 15, 30, 0, 36, 3, 27, 21, 33, 24, 30, 9, 24, 0, 12, 18, 33, 6, 6, 0, 18, 3, 57, 12, 24, 18, 30, 6, 18, 0, 18, 12, 27, 9, 30, 0, 36, 6, 12, 6, 27, 12, 30, 6, 18, 6, 39, 12, 12, 24, 12, 0, 30, 0, 30, 6, 15, 15, 18, 3, 24, 18, 9, 12, 30, 9, 30, 0, 18, 6, 42, 18, 30, 0, 6, 10, 42, 0, 24, 12, 12, 18, 48, 0, 24, 3, 24, 15, 18, 6, 24, 18, 18, 0, 42, 6, 30, 15, 18, 0, 
42, 12, 15, 24, 12, 12, 24, 0, 12, 6, 18, 18, 60, 6, 30, 0, 12, 0, 24, 0, 9, 18, 30, 15, 42, 0, 30, 24, 6, 6, 12, 0, 42, 3, 27, 6, 30, 6, 36, 12, 12, 0, 30, 6, 18, 12, 12, 0, 18, 6, 12, 21, 27, 6, 36, 6, 36, 9, 18, 24, 33, 9, 30, 0, 6, 6, 54, 6, 36, 24, 18, 0, 30, 3, 12, 6, 21, 24, 24, 0, 18, 0, 24, 12, 42, 9, 42, 21, 12, 12, 21, 12, 21, 6, 12, 0, 42, 6, 12, 18, 12, 12, 36, 6, 30, 0, 18, 0, 36, 12, 12, 0, 30, 0, 24, 12, 21, 21, 12, 6, 12, 6, 30, 18, 18, 15, 42, 0, 18, 6, 9, 15, 42, 12, 30, 3, 24, 3, 33, 6, 18, 18, 18, 
0, 36, 0, 48, 24, 3, 6, 36, 9, 36, 6, 24, 12, 36, 12, 24, 0, 18, 6, 24, 3, 36, 0, 18, 12, 18, 0, 9, 30, 33, 12, 36, 0, 30, 0, 12, 6, 21, 12, 18, 12, 24, 6, 39, 6, 12, 24, 18, 0, 30, 0, 42, 15, 18, 6, 24, 6, 12, 12, 12, 12, 24, 6, 18, 0, 24, 1, 30, 9, 54, 9, 6, 9, 48, 6, 18, 18, 18, 12, 60, 0, 12, 6, 9, 24, 15, 18, 30, 12, 12, 0, 42, 6, 24, 18, 18, 0, 24, 3, 18, 12, 24, 12, 30, 6, 48, 6, 15, 12, 42, 6, 24, 0, 12, 12, 36, 6, 3, 18, 12, 3, 36, 0, 48, 18, 0, 6, 18, 0, 30, 6, 12, 9, 48, 15, 12, 12, 6, 6, 36, 0, 18, 18, 30, 
0, 30, 0, 27, 12, 24, 18, 18, 9, 18, 0, 9, 18, 48, 0, 30, 0, 24, 0, 42, 18, 15, 18, 18, 9, 36, 9, 24, 12, 36, 18, 24, 0, 30, 12, 18, 3, 30, 0, 42, 12, 6, 6, 15, 12, 12, 18, 24, 0, 30, 0, 24, 24, 12, 6, 66, 0, 24, 0, 15, 18, 30, 6, 12, 0, 0, 6, 24, 18, 36, 12, 6, 12, 30, 0, 30, 12, 18, 12, 24, 0, 0, 0, 18, 12, 48, 9, 24, 3, 36, 9, 30, 6, 27, 24, 18, 0, 48, 0, 15, 18, 21, 6, 24, 15, 36, 3, 30, 12, 6, 12, 30, 0, 12, 6, 48, 0, 30, 21, 24, 6, 24, 6, 30, 18, 15, 6, 30, 0, 30, 12, 6, 18, 18, 12, 12, 3, 30, 0, 42, 12, 21, 6, 12, 0, 30, 0, 18, 12, 24, 24, 30, 6, 12, 12, 18, 0, 18, 0, 54, 0, 12, 0, 24, 3, 24, 24, 18, 13, 36, 3, 18, 18, 24, 18, 24, 0, 18, 6, 9, 18, 39, 6, 12, 9, 30, 12, 36, 12, 30, 18, 0, 0, 36, 0, 48, 12, 6, 0, 54, 12, 18, 0, 6, 18, 39, 12, 24, 0, 24, 0, 27, 6, 18, 18, 18, 6, 36, 3, 18, 24, 6, 9, 30, 0, 24, 6, 18, 9, 48, 6, 24, 12, 12, 6, 24, 6, 24, 6, 12, 0, 24, 0, 24, 18, 18, 9, 36, 6, 24, 6, 6, 12, 15, 9, 30, 0, 18, 9, 54, 6, 24, 18, 6, 9, 48, 0, 24, 12, 21, 12, 30, 0, 24, 3, 24, 6, 30, 6, 24, 18, 12, 6, 27, 6, 33, 21, 18, 0, 30, 6, 6, 24, 18, 18, 36, 0, 48, 0, 24, 6, 30, 12, 12, 0, 18, 0, 18, 6, 27, 21, 24, 6, 18, 6, 24, 12, 6, 15, 36, 0, 12, 6, 15, 18, 42, 6, 24, 6, 12, 0, 18, 12, 6, 12, 24, 0, 24, 3, 45, 15, 12, 12, 30, 3, 18, 9, 21, 12, 45, 12, 18, 0, 18, 6, 27, 6, 36, 6, 18, 9, 36, 6, 12, 30, 21, 6, 36, 0, 36, 0, 12, 9, 15, 24, 30, 18, 12, 0, 27, 6, 18, 12, 18, 0, 42, 3, 36, 6, 12, 12, 24, 0, 24, 0, 39, 18, 36, 6, 12, 0, 12, 6, 6, 15, 30, 0, 12, 6, 36, 6, 30, 12, 18, 9, 42, 0, 6, 6, 12, 18, 12, 6, 12, 9, 18, 4, 54, 6, 21, 24, 12, 0, 24, 0, 21, 18, 18, 12, 48, 6, 30, 12, 12, 6, 30, 6, 36, 0, 18, 6, 36, 0, 24, 18, 12, 0, 24, 0, 27, 24, 9, 18, 24, 0, 42, 0, 12, 12, 36, 6, 6, 15, 18, 6, 42, 6, 18, 21, 18, 0, 24, 6, 24, 18, 12, 6, 24, 6, 18, 12, 6, 6, 42, 6, 30, 0, 12, 0, 36, 3, 18, 12, 6, 18, 30, 0, 24, 6, 18, 18, 24, 0, 6, 9, 12, 15, 54, 6, 30, 3, 12, 0, 33, 12, 30, 6, 12, 0, 42, 6, 15, 18, 3, 12, 36, 9, 24, 12, 18, 12, 18, 12, 30, 0, 24, 0, 21, 9, 36, 18, 24, 6, 18, 0, 27, 12, 6, 6, 48, 0, 12, 0, 24, 15, 36, 0, 6, 12, 24, 6, 15, 12, 45, 18, 18, 0, 24, 6, 18, 15, 12, 24, 24, 6, 18, 0, 12, 0, 36, 0, 12, 0, 18, 0, 36, 12, 36, 18, 6, 12, 30, 0, 12, 12, 15, 3, 24, 0, 36, 3, 21, 6, 9, 12, 42, 12, 12, 6, 33, 12, 15, 30, 12, 0, 30, 3, 24, 12, 30, 6, 18, 0, 12, 12, 39, 18, 30, 3, 12, 0, 18, 6, 24, 12, 21, 6, 18, 
3, 54, 0, 24, 6, 6, 24, 36, 0, 18, 0, 21, 12, 21, 6, 30, 12, 6, 0, 18, 12, 24, 21, 24, 0, 36, 6, 24, 3, 18, 12, 12, 6, 18, 6, 6, 12, 48, 6, 12, 0, 6, 3, 21, 12, 0, 18, 18, 1, 30, 0, 48, 18, 21, 6, 24, 0, 42, 6, 12, 12, 30, 6, 12, 12, 6, 0, 30, 6, 36, 12, 24, 0, 
24, 0, 15, 18, 15, 18, 60, 0, 12, 12, 6, 12, 24, 6, 30, 0, 6, 3, 48, 15, 18, 18, 0, 12, 30, 0, 12, 18, 18, 12, 24, 0, 24, 6, 12, 6, 30, 0, 36, 6, 18, 12, 24, 0, 18, 3, 12, 0, 42, 6, 18, 18, 6, 6, 36, 9, 18, 0, 18, 18, 3, 12, 0, 0, 12, 0, 54, 0, 33, 21, 24, 6, 18, 3, 15, 12, 15, 6, 30, 0, 24, 6, 6, 18, 39, 12, 36, 12, 18, 3, 24, 6, 27, 12, 12, 0, 30, 0, 18, 18, 12, 9, 24, 0, 42, 12, 6, 0, 39, 15, 30, 0, 12, 6, 30, 0, 6, 12, 24, 12, 12, 0, 24, 18, 27, 12, 36, 0, 12, 0, 6, 12, 18, 9, 18, 3, 18, 6, 36, 6, 24, 6, 12, 0, 30, 9, 24, 12, 18, 12, 24, 6, 0, 3, 18, 6, 30, 6, 24, 0, 24, 6, 9, 3, 24, 12, 12, 9, 36, 6, 15, 30, 12, 18, 36, 0, 36, 0, 21, 6, 18, 6, 18, 15, 18, 0, 24, 6, 15, 18, 12, 0, 48, 0, 42, 3, 6, 6, 18, 12, 18, 3, 15, 18, 33, 12, 12, 0, 24, 6, 12, 6, 24, 18, 12, 0, 30, 6, 15, 18, 18, 0, 36, 0, 12, 0, 18, 21, 24, 9, 12, 12, 6, 6, 42, 0, 12, 6, 24, 0, 6, 0, 18, 18, 15, 18, 18, 3, 48, 0, 6, 6, 30, 12, 30, 0, 12, 1, 27, 6, 12, 6, 12, 6, 42, 6, 30, 18, 12, 12, 24, 0, 12, 6, 12, 3, 45, 6, 30, 6, 18, 0, 33, 12, 18, 24, 6, 0, 36, 0, 0, 12, 12, 15, 30, 3, 24, 6, 12, 12, 18, 6, 30, 0, 18, 6, 30, 6, 30, 18, 6, 12, 12, 0, 24, 0, 6, 0, 48, 0, 24, 6, 24, 3, 30, 6, 12, 6, 6, 9, 18, 6, 30, 18, 0, 0, 30, 0, 18, 24, 12, 12, 18, 0, 12, 6, 12, 12, 45, 6, 18, 0, 12, 0, 33, 3, 12, 18, 24, 9, 18, 0, 21, 18, 18, 12, 24, 0, 24, 12, 12, 12, 6, 6, 48, 3, 18, 0, 30, 12, 12, 12, 6, 0, 36, 0, 24, 18, 18, 0, 36, 12, 12, 6, 3, 12, 30, 6, 24, 0, 6, 6, 18, 12, 30, 12, 12, 0, 30, 3, 21, 6, 18, 18, 24, 0, 12, 0, 18, 15, 30, 0, 0, 15, 12, 6, 42, 6, 18, 18, 6, 0, 18, 0, 30, 6, 18, 0, 18, 9, 24, 0, 6, 6, 18, 6, 18, 0, 18, 6, 21, 12, 15, 21, 30, 6, 30, 3, 36, 12, 3, 6, 18, 0, 18, 12, 12, 0, 39, 6, 12, 0, 24, 9, 39, 12, 24, 6, 12, 0, 18, 0, 27, 12, 12, 15, 36, 9, 18, 6, 6, 12, 3, 6, 30, 0, 24, 0, 36, 6, 12, 18, 6, 6, 36, 0, 12, 6, 21, 18, 18, 0, 12, 6, 18, 3, 42, 9, 12, 6, 12, 6, 6, 6, 30, 12, 12, 0, 18, 0, 21, 18, 6, 6, 30, 0, 18, 3, 24, 6, 18, 6, 6, 0, 18, 0, 24, 3, 15, 18, 12, 13, 18, 6, 18, 12, 24, 9, 30, 0, 18, 6, 9, 18, 36, 0, 36, 6, 12, 0, 24, 6, 27, 18, 12, 0, 12, 0, 18, 21, 12, 12, 18, 
12, 18, 3, 12, 12, 36, 6, 24, 0, 6, 6, 42, 6, 18, 6, 12, 6, 36, 6, 0, 12, 12, 0, 18, 0, 42, 0, 12, 6, 30, 3, 18, 12, 0, 6, 36, 0, 3, 18, 12, 0, 18, 0, 24, 12, 9, 18, 24, 0, 12, 0, 9, 18, 24, 6, 18, 0, 0, 0, 30, 12, 30, 6, 0, 0, 30, 6, 6, 6, 9, 9, 30, 0, 24, 3, 12, 12, 30, 12, 30, 12, 30, 0, 24, 0, 21, 18, 12, 0, 18, 3, 12, 12, 18, 15, 36, 0, 12, 6, 18, 6, 42, 9, 18, 0, 12, 6, 12, 0, 15, 12, 18, 9, 30, 0, 36, 18, 0, 6, 24, 0, 12, 0, 18, 12, 27, 12, 6, 6, 6, 9, 18, 0, 12, 15, 6, 0, 30, 6, 24, 12, 18, 0, 24, 0, 18, 6, 6, 
6, 18, 6, 30, 0, 0, 3, 18, 0, 18, 12, 18, 6, 30, 0, 6, 18, 15, 12, 12, 0, 24, 6, 15, 3, 12, 6, 18, 15, 12, 0, 36, 12, 12, 0, 24, 0, 36, 0, 27, 12, 18, 18, 24, 3, 24, 6, 18, 18, 18, 12, 0, 0, 24, 3, 18, 9, 30, 6, 6, 6, 18, 0, 18, 12, 12, 12, 48, 0, 6, 6, 0, 12, 18, 0, 18, 6, 24, 0, 39, 6, 18, 3, 12, 0, 6, 6, 12, 15, 6, 12, 18, 6, 30, 0, 18, 0, 15, 12, 12, 0, 6, 0, 24, 6, 24, 9, 18, 3, 18, 6, 12, 12, 12, 0, 18, 0, 18, 6, 3, 9, 18, 12, 18, 12, 12, 1, 24, 6, 15, 12, 18, 0, 42, 0, 18, 6, 12, 12, 18, 0, 12, 12, 15, 12, 30, 9, 42, 0, 6, 6, 18, 6, 18, 18, 12, 9, 30, 0, 6, 6, 12, 12, 30, 0, 30, 0, 6, 6, 24, 0, 18, 6, 6, 6, 30, 0, 12, 18, 18, 0, 12, 6, 27, 9, 12, 0, 18, 6, 18, 6, 0, 12, 42, 0, 6, 0, 6, 0, 21, 12, 9, 18, 12, 0, 24, 0, 18, 12, 12, 24, 0, 0, 6, 0, 12, 0, 36, 0, 36, 6, 0, 
0, 24, 6, 6, 12, 6, 0, 30, 0, 12, 9, 18, 6, 36, 3, 42, 12, 3, 12, 6, 0, 30, 0, 6, 0, 27, 12, 6, 18, 12, 6, 30, 0, 18, 18, 12, 0, 30, 0, 24, 3, 24, 3, 24, 6, 12, 12, 6, 6, 9, 6, 30, 12, 12, 0, 30, 6, 6, 12, 6, 12, 18, 3, 12, 0, 21, 12, 18, 0, 6, 0, 6, 0, 36, 9, 24, 18, 6, 12, 24, 0, 12, 0, 6, 0, 24, 0, 18, 0, 6, 6, 24, 0, 24, 3, 12, 6, 18, 12, 6, 18, 6, 0, 30, 0, 15, 6, 3, 6, 12, 6, 24, 12, 6, 6, 15, 9, 12, 0, 12, 3, 39, 6, 27, 6, 18, 0, 12, 0, 21, 18, 15, 24, 18, 0, 12, 3, 12, 6, 6, 6, 18, 3, 18, 0, 36, 12, 9, 9, 18, 0, 30, 6, 12, 6, 21, 12, 12, 6, 18, 6, 12, 0, 24, 6, 24, 0, 12, 0, 18, 3, 15, 12, 12, 6, 18, 0, 12, 6, 18, 9, 12, 0, 18, 6, 9, 15, 24, 0, 12, 6, 12, 0, 12, 6, 30, 12, 12, 0, 6, 3, 18, 6, 0, 9, 30, 6, 6, 6, 12, 6, 15, 6, 12, 0, 18, 6, 12, 0, 12, 12, 18, 1, 24, 0, 
12, 6, 12, 0, 36, 0, 12, 0, 6, 15, 39, 12, 12, 12, 12, 6, 30, 0, 18, 6, 0, 0, 18, 3, 24, 18, 12, 6, 12, 0, 12, 0, 15, 12, 24, 6, 30, 0, 6, 6, 24, 6, 15, 6, 6, 12, 36, 0, 18, 12, 12, 9, 6, 0, 12, 6, 12, 0, 24, 6, 24, 6, 0, 0, 21, 6, 9, 18, 6, 0, 18, 0, 12, 18, 12, 6, 30, 0, 18, 0, 12, 12, 12, 0, 0, 0, 12, 6, 30, 6, 12, 6, 0, 0, 24, 0, 12, 6, 3, 6, 30, 0, 12, 0, 6, 6, 21, 9, 18, 12, 6, 6, 12, 0, 27, 18, 12, 0, 12, 0, 12, 12, 9, 12, 24, 3, 30, 9, 6, 6, 42, 6, 6, 0, 12, 0, 30, 0, 6, 3, 6, 12, 6, 6, 24, 12, 3, 12, 24, 0, 24, 3, 12, 12, 24, 12, 6, 0, 12, 0, 36, 0, 9, 6, 12, 0, 30, 6, 12, 12, 12, 9, 18, 0, 0, 6, 12, 0, 30, 0, 24, 0, 12, 0, 0, 0, 24, 12, 12, 3, 6, 3, 21, 18, 0, 6, 24, 0, 12, 0, 12, 6, 3, 6, 0, 6, 12, 6, 24, 0, 15, 12, 0, 0, 24, 0, 15, 3, 12, 6, 24, 3, 18, 0, 3, 12, 27, 12, 18, 0, 18, 0, 15, 6, 12, 12, 6, 3, 18, 3, 27, 12, 18, 6, 18, 0, 18, 0, 24, 9, 12, 6, 12, 6, 6, 6, 15, 6, 12, 0, 18, 0, 24, 0, 6, 15, 24, 3, 18, 6, 12, 6, 15, 6, 18, 9, 30, 0, 0, 6, 18, 9, 9, 12, 6, 6, 12, 0, 24, 0, 12, 12, 12, 0, 0, 0, 6, 9, 30, 0, 0, 9, 
18, 6, 0, 6, 18, 6, 12, 0, 12, 0, 15, 12, 0, 0, 24, 6, 18, 0, 6, 6, 12, 0, 6, 0, 12, 1, 18, 0, 24, 15, 12, 0, 18, 6, 21, 12, 6, 6, 30, 0, 6, 6, 0, 6, 15, 12, 30, 3, 18, 0, 12, 6, 6, 18, 12, 0, 30, 0, 15, 12, 6, 6, 24, 6, 12, 6, 6, 6, 24, 0, 12, 0, 6, 6, 36, 3, 12, 12, 0, 6, 6, 0, 18, 6, 21, 6, 18, 0, 30, 6, 0, 6, 18, 6, 6, 0, 6, 0, 30, 0, 24, 12, 0, 0, 24, 0, 6, 0, 0, 18, 12, 6, 0, 0, 6, 0, 30, 0, 18, 0, 6, 0, 15, 6, 6, 6, 12, 3, 24, 0, 0, 12, 0, 6, 18, 0, 18, 12, 9, 3, 12, 0, 18, 3, 6, 3, 15, 12, 12, 18, 12, 0, 18, 0, 33, 6, 0, 0, 36, 3, 12, 6, 6, 6, 24, 0, 6, 0, 18, 6, 12, 3, 24, 12, 6, 9, 18, 0, 15, 12, 12, 12, 24, 0, 18, 0, 0, 6, 18, 0, 12, 6, 6, 0, 21, 6, 12, 12, 6, 0, 12, 0, 9, 15, 12, 0, 18, 6, 18, 0, 18, 0, 9, 6, 12, 0, 12, 3, 12, 6, 12, 18, 0, 3, 24, 0, 6, 6, 6, 0, 6, 0, 6, 6, 6, 12, 6, 0, 18, 6, 6, 0, 18, 12, 6, 0, 6, 0, 18, 0, 18, 0, 15, 9, 24, 0, 6, 3, 15, 12, 9, 6, 18, 0, 12, 0, 12, 6, 18, 12, 6, 3, 36, 3, 12, 6, 6, 12, 18, 0, 12, 0, 18, 6, 18, 6, 12, 6, 6, 12, 6, 0, 9, 12, 18, 0, 24, 0, 24, 3, 6, 6, 12, 6, 12, 0, 6, 6, 27, 6, 6, 0, 12, 0, 3, 6, 12, 9, 12, 0, 6, 6, 12, 6, 18, 3, 18, 0, 6, 6, 6, 0, 6, 6, 30, 0, 6, 3, 18, 6, 12, 12, 6, 0, 12, 0, 6, 0, 3, 6, 12, 0, 12, 6, 6, 0, 12, 6, 12, 0, 6, 0, 12, 3, 12, 0, 12, 7, 24, 0, 9, 12, 15, 12, 24, 0, 12, 0, 6, 12, 12, 6, 0, 6, 6, 3, 
24, 0, 27, 12, 6, 0, 24, 0, 18, 12, 12, 12, 18, 0, 0, 6, 6, 6, 18, 0, 12, 0, 12, 0, 30, 0, 6, 3, 6, 6, 18, 6, 3, 18, 0, 6, 24, 0, 18, 0, 0, 6, 18, 6, 12, 6, 0, 0, 24, 0, 6, 0, 12, 0, 12, 0, 12, 12, 0, 0, 12, 3, 24, 6, 6, 12, 0, 0, 6, 0, 6, 3, 30, 0, 21, 12, 0, 0, 18, 0, 6, 6, 0, 6, 12, 0, 0, 0, 0, 6, 18, 0, 12, 15, 6, 0, 0, 6, 15, 9, 12, 0, 24, 3, 6, 12, 9, 6, 24, 0, 24, 0, 12, 0, 33, 6, 0, 0, 6, 3, 24, 0, 6, 6, 6, 6, 6, 3, 39, 6, 6, 9, 18, 0, 6, 6, 6, 6, 15, 6, 6, 0, 12, 6, 12, 0, 3, 12, 6, 0, 18, 0, 12, 6, 9, 6, 18, 
0, 12, 0, 3, 6, 18, 9, 18, 0, 0, 6, 12, 0, 18, 0, 6, 3, 12, 0, 0, 6, 6, 6, 18, 0, 6, 3, 12, 0, 9, 12, 6, 6, 12, 0, 6, 0, 3, 12, 6, 0, 30, 6, 12, 0, 6, 6, 6, 0, 6, 0, 6, 0, 12, 0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