This page is still under construction.

Parts of this page are still being built. What you see may change.

Sports Day

Interview

Time limit2sMemory limit1024 MB

Summary
Given N students, K on the Red Team, and a string listing the other N-1 students' teams, decide Aoi's team.
Level

Easy1 of 10

Topics
Implementation, String, Math, Array
Solved
No attempts yet

Problem

JOI High School has N students, numbered 1 through N.

Next month the school holds a sports day, and all N students take part. K of the students belong to the Red Team, and the remaining N-K belong to the White Team.

Aoi, student number N, has forgotten which team she belongs to. She decides to ask each of the other N-1 students which team they belong to, and use their answers to determine her own team.

The team information for the N-1 students other than Aoi is given as a string S of length N-1. Each character of S is either R or W, with the following meaning.

  • If the i-th character of S (1 ≦ i ≦ N-1) is R, student number i belongs to the Red Team.
  • If the i-th character of S (1 ≦ i ≦ N-1) is W, student number i belongs to the White Team.

Output R if Aoi belongs to the Red Team, and W if she belongs to the White Team.

Input

The input is given from standard input in the following format.

N
K
S

Output

Output R if Aoi belongs to the Red Team, and W if she belongs to the White Team.

Constraints

  • 2 ≦ N ≦ 2000.
  • 1 ≦ K ≦ N-1.
  • S is a string of length N-1.
  • Each character of S is either R or W.
  • The number of R characters in S is either K-1 or K.
  • N and K are integers.

Examples3

  1. Example 1

    Input
    7
    3
    RWWRWW
    
    Expected output
    R
    
  2. Example 2

    Input
    5
    3
    RWRR
    
    Expected output
    W
    
  3. Example 3

    Input
    70
    1
    WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
    
    Expected output
    R