Tom and Jerry were sent to a kingdom for some intelligence purpose. They were ordered to draw a map of the kingdom.
It's known that the kingdom consists of nn cities, numbered from 11 to nn, along with n−1n−1 bidirectional roads connecting them. The cities form a binary tree, whose root is the kingdom's capital. The nodes on the tree either have no child, or a single left child, or a single right child, or both.
To avoid being caught spying, the commander ordered Tom and Jerry not to directly draw the map, but to record some specific information separately, which combined can deduce what the kingdom looks like.
When on a tree node, Tom was ordered to:
1. Record the label of current node.
2. Go to left child node(if any).
3. Go to right child node(if any).
Jerry was ordered to:
1. Go to left child node(if any).
2. Record the label of current node.
3. Go to right child node(if any).
But things often go south in Tom and Jerry's lives. When returned homeland with their information, they found that some of the numbers they wrote down are spotted. In despair, they decide to calculate how many kinds of form can the kingdom be according to the remaining information. As the number is large, you are only required to print it mod 998244353998244353.