There are multiple test cases. The first line of the input contains an integer $T$, indicating the number of test cases. For each test case:
The first line contains an integer $n(1 \le n \le 2 \times 10^5)$, indicating the length of string $s$.
The second line contains the string $s(|s|=n)$ consisting of 'C' and 'P'.
It's guaranteed that the sum of $n$ over all test cases will not exceed $10^6$.