Your program is to write to standard output. The first line should contain an integer indicating the maximum number of wining matches The following shows sample input and output for four test cases.
12 4 RSPPSSSRRPPR RRRR
3
12 3 RRRRRRRRRRRR SSS
0
12 4 PPPRRRRRRRRR RSSS
2
12 4 RRRRRRRRRSSS RRRS