ZYT found a chessboard with two rows and

columns, and there are some cannons in it -

cannons in the first row and

in the second row.
In Chinese Chess, if a cannon and another piece (let’s call it A) are in the same row or column, and there is exactly one other piece in between, this cannon can capture A and move to A's original position.(In this problem, in order to keep the situation simple, we think that a cannon can capture any piece except itself, without considering which side it belongs to. )
Now, ZYT has performed a series of operations on these cannons. Define an operation
)
as the

cannon currently counting from left to right in the

row has eaten the

cannon of the same row, where

(

is the number of cannons in this row). Define an operation sequence as an ordered arrangement of a series of operations.
ZYT wants to get many different sequences of operations. He is bored, so he wants to know how many different operation sequences can be generated for

operations.
Specifically, he wants to know how many different operation sequences can be generated for i times under the following two rules:
- ZYT can perform any operation that meets the above rules.
- In all operations performed by ZYT, there are no two integers
, satisfying
and
.
Since
ZYT didn’t want to see a lot of output data, he asked to output the answer in the following way: For each question, let

be the number of legal operation sequences obtained by operating

times modulo

.Please output

, where

represents an exclusive OR operation.