There is an integer �x satisfying 1≤�≤�1≤x≤n. You know �n but you don't know �x.
You can do the following guessing: pick an random integer �y uniformly satisfying 1≤�≤�1≤y≤n (your �y may equal to previous queries), and you will be told if �<�x<y, �>�x>y or �=�x=y. You will stop asking if there is only one possible �x satisfying all the conditions.
Given �n, if �x is picked randomly uniformly, what's your expected number of queries?
The first line contains an integer �T (1≤�≤1001≤T≤100) denoting the number of test cases.
For each test case, the only line contains an integer �n (1≤�≤1091≤n≤109).
For each test case, output one integer denoting the expected number of queries modulo 998244353998244353.
Formally, it can be proven that the sought expected value can be represented as an irreducible fraction �/�p/q which satisfies �≢0mod998244353q≡0mod998244353, and there is a unique integer �r satisfies 0≤�<9982443530≤r<998244353 and ��≡�mod998244353qr≡pmod998244353. Find this �r.
2
1
2
0
1