use std::io::Read; fn p(mut n: u64) -> u64 { let (mut a, mut r, d) = (2, 3, 998244353); while n > 0 { if n & 1 == 1 { a = a * r % d; } r = r * r % d; n >>= 1; } a } fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let n: Vec = s.split_whitespace().skip(1).flat_map(str::parse).collect(); for i in n { println!("{}", p(i - 1)) } }