题目描述
Problem Description
JOI High School has $ N $ students, each assigned a unique attendance number from $ 1 $ to $ N $.
Next month, JOI High School will host a sports day, and all $ N $ students will participate. Among the students, $ K $ are in the Red Team, and the remaining $ N-K $ are in the White Team.
Azalea, who has the attendance number $ N $, has forgotten which team she belongs to. Therefore, she decided to ask the other $ N-1 $ students about their team assignments to determine which team she belongs to.
The team assignment information for the $ N-1 $ students other than Azalea is represented by a string $ S $ of length $ N-1 $. Each character in $ S $ is either R or W, with the following meanings:
- If the $ i $-th character of $ S $ ($1 \leq i \leq N-1$) is
R, it indicates that the student with attendance number $ i $ is in the Red Team. - If the $ i $-th character of $ S $ ($1 \leq i \leq N-1$) is
W, it indicates that the student with attendance number $ i $ is in the White Team.
Output R if Azalea is in the Red Team, or W if she is in the White Team.
Input Format
The input is given from the standard input in the following format:
$ N $ $ K $ $ S $
Output Format
Output R if Azalea is in the Red Team, or W if she is in the White Team.
Sample Input and Output
Sample Input #1
7
3
RWWRWW
Sample Output #1
R
Sample Input #2
5
3
RWRR
Sample Output #2
W
Sample Input #3
70
1
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
Sample Output #3
R
Notes/Hints
Constraints
- $2 \leq N \leq 2,000$.
- $1 \leq K \leq N-1$.
- $ S $ is a string of length $ N-1 $.
- Each character in $ S $ is either
RorW. - The number of
Rcharacters in $ S $ is either $ K-1 $ or $ K $. - $ N $ and $ K $ are integers.
Sample Explanation 1
The students with attendance numbers $ 1, 2, 3, 4, 5, 6 $ are in the Red Team, White Team, White Team, Red Team, White Team, and White Team, respectively. Excluding Azalea, there are $ 2 $ students in the Red Team and $ 4 $ students in the White Team. Since $ 3 $ students are in the Red Team and the remaining $ 4 $ are in the White Team, Azalea is in the Red Team. Therefore, output R.
Sample Explanation 2
The students with attendance numbers $ 1, 2, 3, 4 $ are in the Red Team, White Team, Red Team, and Red Team, respectively. Excluding Azalea, there are $ 3 $ students in the Red Team and $ 1 $ student in the White Team. Since $ 3 $ students are in the Red Team and the remaining $ 2 $ are in the White Team, Azalea is in the White Team. Therefore, output W.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分