AT_abc468_g [ABC468G] Restricted Permutation

Description

You are given an integer $ N $ and a string $ S $ of length $ N $ consisting of `o` and `x`. Find the number, modulo $ 998244353 $ , of permutations $ P=(P_1,P_2,\ldots,P_N) $ of $ (1,2,\ldots,N) $ satisfying the following condition. - For $ k=1,2,\ldots,N $ , the following two are equivalent. - $ S_k= $ `o` - $ P $ contains a permutation of $ (1,2,\ldots,k) $ as a contiguous subsequence.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ S $

Output Format

Output the answer.

Explanation/Hint

### Sample Explanation 1 $ P=(1,3,2),(2,3,1) $ satisfy the condition. ### Sample Explanation 2 There is no $ P $ satisfying the condition. ### Constraints - $ 1\le N\le 2000 $ - $ S_i $ is a string of length $ N $ consisting of `o` and `x`.