Consider S, the sequence of integer sequences. Initially, S_0=(1). After that, we construct S_1,S_2,…,S_n as follows.
Let ∣S_i∣ be the length of the sequence S_i, and s_i,j be the j-th element of S_i. Then S_i+1 will have length ∣S_i∣+1 and can be obtained from ∣S_i∣ using one of the following two operations:
Given n and m, find the number of different ordered sets of sequences S_1…S_n. Two sets are considered different if, at least for one i from 1 to n, the sequences S_i in those sets differ. As the answer may be too large, print it modulo 998,244,353.
The input consists of one line containing two integers n and m (1≤n≤3000, 2≤m≤108).
Print the number of different sequences S modulo 998,244,353.
Here are the possible sequences in the first example:
Therefore, the answer is 5.