#P7809. Tetrahedron

Tetrahedron

Tetrahedron

Problem Description

Generate three integers aa, bb, and cc in [1,n][1,n] with equal probability independently, and use them as the three right-angle side length of a right-angled tetrahedron. Find the expectation of the reciprocal square of the distance from the right-angle apex to the slope (Euclidean distance). For each test case, output a line containing the answer mod 998244353998244353. 图片

Input

In the first line, you should read an integer TT denoting the number of test cases. In every test case, the only line will include an integer nn. It is guaranteed that TT is no larger than 2×1062 \times 10^6 and nn is no larger than 6×1066 \times 10^6.

Output

For each test case, output the only line containing just one integer denoting the answer mod 998244353998244353.

Sample Input

3
1
2
3

Sample Output

3
124780546
194103070

Source

2020 Multi-University Training Contest 5