#K96022. Unique Domino Arrangements

    ID: 38994 Type: Default 1000ms 256MiB

Unique Domino Arrangements

Unique Domino Arrangements

You are given a set of dominoes. Your task is to determine the number of unique symmetrical arrangements possible using N dominoes. The result should be computed modulo 998244353.

The number of arrangements follows the recurrence:

dpn=dpn1+dpn2dp_n = dp_{n-1} + dp_{n-2}

with the initial conditions:

dp1=1,dp2=2dp_1 = 1, \quad dp_2 = 2

For each test case, compute the corresponding value for a given N.

inputFormat

The input is given via standard input. The first line contains an integer T, representing the number of test cases. Each of the following T lines contains a single integer N, representing the number of dominoes.

outputFormat

For each test case, output a single integer on a new line, which is the number of unique domino arrangements modulo 998244353.## sample

3
1
2
3
1

2 3

</p>