Training Site
Sideways banner 8b44c02b768aa359c4d0a2bce3b247c6d7ab888f8b26852e9bfc3659c8c25612

Dorothy’s Red Shoes

Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 128 megabytes
Time limit: 1.0 seconds

The principal of the school insists kids take their shoes off outside the classroom. However Dorothy’s aunt is a worrywart since the time she went missing, and often rings to see if Dorothy is safely in the classroom.
The fastest way to say “yes, Mrs Gale, she’s here” is to send the assistant down to the classroom. If there are 2 red shoes, the assistant knows she’s in the room. (No other child would be seen dead in red shoes.)
On any one day there are varying numbers of pairs of shoes and sometimes a kid has temporarily lost one (children will be children!). And of course they are all over the place outside the room, not in nice neat pairs. The shoes come in four different colours - Green, Black, Red and Mustard. Given the shoes that the assistant finds, help the her figure out if Dorothy is in the room.

Input Format

To simplify matters the assistant mentally thinks G for Green, B for Black, R for Red, and M for Mustard. The input will be a string of those letters, representing the shoes that the assistant has found.

Output Format

Output one of these 3 sentences:

  • “Dorothy is in the classroom.” if there are 2 red shoes.
  • “Maybe Dorothy is in Kansas.” If there are no red shoes.
  • “Hop along Dorothy and find that other shoe.” if there is only one red shoe.

Our automated grading system is very strict, so the sentences you output must be correct to the letter. Make sure you remember to include the full stop at the end of each sentence!


It is guaranteed that there will be at least 1 and no more than 20 shoes in the input. Additionally, at most 2 of them will be red shoes.

  • Sample Input 1


    Sample Output 1

    Dorothy is in the classroom.
  • Sample Input 2


    Sample Output 2

    Hop along Dorothy and find that other shoe.
  • Sample Input 3


    Sample Output 3

    Maybe Dorothy is in Kansas.