#arc160b. [arc160_b]Triple Pair

[arc160_b]Triple Pair

Problem Statement

You are given a positive integer NN.

Find the number, modulo 998244353998244353, of triples of positive integers (x,y,z)(x,y,z) that satisfy the following condition.

  • All of xyxy, yzyz, zxzx are less than or equal to NN.

You have TT test cases to solve.

Constraints

  • 1leTle1001 \\le T \\le 100
  • 1leNle1091 \\le N \\le 10^9

Input

The input is given from Standard Input in the following format, where mathrmcasei\\mathrm{case}_i represents the ii-th test case:

TT mathrmcase1\\mathrm{case}_1 mathrmcase2\\mathrm{case}_2 vdots\\vdots mathrmcaseT\\mathrm{case}_T

Each test case is in the following format:

NN

Output

Print TT lines. The ii-th line (1leileT)(1 \\le i \\le T) should contain the answer for the ii-th test case.


Sample Input 1

4
1
2
5
998244353

Sample Output 1

1
4
17
727512986

In the first test case, N=1N=1. There is one triple (x,y,z)(x,y,z) that satisfies the condition: (1,1,1)(1,1,1).

In the second test case, N=2N=2. There are four triples (x,y,z)(x,y,z) that satisfy the condition: (1,1,1),(2,1,1),(1,2,1),(1,1,2)(1,1,1),(2,1,1),(1,2,1),(1,1,2).