You are given an integer k, a string s of length n consisting only of the characters < and >, and an array a1,a2,…,an.
Count the number of arrays x1,x2,…,xn such that 1≤xi≤k for every i, and all of the following conditions are satisfied:
For each i from 1 to n:
- if si is
<, then max(x1,x2,…,xi)<ai.
- if si is
>, then max(x1,x2,…,xi)>ai.
Print the answer modulo 998244353.