Putata and Budada are playing an interesting game. They play this game with a die having n faces. Every integer between 0 and n−1 are written on exactly one face, and when they roll this die, each side will face up with equal probability. In other words, rolling the die will result in a uniform random integer between 0 and n−1 with equal probability.
The game has two rounds. In the first round, the following happens:
In the second round, Budada can choose to do one of the following things:
Putata and Budada want to maximize the score of the game, and they are so clever that they will always make the best choice. Please write a program to calculate, for some given n, the expectation of the score of the game.
It can be shown that the answer can be expressed as an irreducible fraction yx, where x and y are integers and y≡0(mod998,244,353). Output the integer equal to x⋅y−1(mod998,244,353). In other words, output such an integer a that 0≤a<998,244,353 and a⋅y≡x(mod998,244,353).
The input contains several test cases. The first line contains an integer T (1≤T≤104).
For the following T lines, each line contains an integer n (1≤n≤998,244,352), denoting one question.
Output T lines, each line denotes the answer for one test case.