MOD = 998244353 def solve(): n = int(input()) ans = 2 tot = 2 for _ in range(n - 1): ans = 2 * tot + 2 ans %= MOD tot += ans tot %= MOD print(ans) for _ in range(int(input())): solve()