Dereck is an avid Java programmer while Derek is a C++ programmer. Whenever someone asks them for help, they tend to mix up their names, frustrating them as they don't know any other languages other than the ones they program in. Being the good friend you are, you decide to intervene and tell people whether they have mixed up their names or not.
- A statement about C++ is defined as a sentence that contains the word
- A statement about Java is defined as a sentence that contains the word
apics(pronounced as AP ICS).
- You will know when the person is asking Dereck or Derek if the sentence has a permutation of his name.
- You are guaranteed that the sentence will either be a Java or C++ statement and not both.
- You are guaranteed that the sentence will either ask for Dereck or Derek and not both.
eis interchangeable with
sis interchangeable with
ais interchangeable with
tis interchangeable with
iis interchangeable with
Given a sentence, \(S\), from Jason, the person who's asking Dere(c)k for help, can you politely tell them whether they're asking the wrong or right Dere(c)k?
The first line will contain a string, \(S\), with at most \(100\ 000\) characters, with all letters being lower-case.
If \(S\) was a Java statement towards Dereck or a C++ statement towards Derek, output
Right Dere(c)k!. If it wasn't then output
Subtask 1 [15%]
\(S\) will contain at most \(100\) lower-case characters.
Subtask 2 [85%]
No further constraints.
hey dcr3ek, can you help me with my homework? i dont really understand b1g1nteger :p
dcr3ek can be rearranged as
d3reck and since
e is interchangeable with
dereck. Following the last step,
i is interchangeable with
1. This makes the sentence a Java sentence that asks Dereck for help, so the output is