using System.Collections; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; internal class Program { private const long mod = 998244353; public static void Main(string[] args) { const int mn = 1 << 18; List mem = new List(mn); List r = new List(mn); List e = new List(mn); r.Add(0); r.Add(1); r.Add(1); e.Add(0); e.Add(1); e.Add(3); for (int i = 3; i < mn; i++) { r.Add((r[i-2]+r[i-1])%mod); e.Add((e[i-2]+e[i-1])%mod); } for (int i = 0; i < mn; i++) { long val = 0; val += 5 * r[i] % mod * r[i] % mod; val -= e[i] * e[i] % mod; if (val < 0) val += mod; mem.Add(val); } int q = int.Parse(Console.ReadLine()); while (q-- > 0) { int n = int.Parse(Console.ReadLine()); Console.WriteLine(mem[n]); } } public static List mkar(int n, int val) { List res = new List(n); for(int i=0;i