Here is a simple math. You are given an integer n. Your task is to calculate the following:
输入格式
The first line contains an integer T (1≤T≤104), denoting the number of test cases. The only line of each test case contains an integer n (2≤n≤108).
输出格式
In fact, the answer can be represented as a fraction Q/P, where gcd(P,Q)=1 and P,Q>0. Since these numbers can be very huge for large n, you are only required to print Q⋅P−1 mod 998244353.
For each test case, print a single line with the calculated value.
输入样例
复制
3
2
3
4
输出样例
复制
499122177
1
831870295
数据范围与提示
Hint
Real answer for sample test cases are 1/2,1,5/6 respectively.