Jane (my -year-old baby daughter) has started speaking some simple words now. "Daddy" and "Mommy" are the two common first words. Hearing those words for the first time is indeed beautiful and memorable.
Last year, Steven really wanted to record when his baby called him for the first time. So, Steven put a microphone and sound capture program near Jane's baby cot (baby's bed). This microphone captured Jane's sounds, and the program transmitted the list of words captured to Steven. He wrote a program to detect the moment when Jane first called him: "daddy" (or its variants). This time, you will also write a similar program.
You are given one word per line. These are the list of captured sounds. Each line contains only lowercase alphabets without any whitespaces and at most characters.
For each word/line, output She called me!!! in one line if that word matches the regular expression below. Otherwise, output Cooing in one line (to indicate that this is just some baby soft murmuring sound).
Note: Quotes are only for clarity.
The regular expression (regex): da+dd?(i|y).
If you are not familiar with regex, here is an explanation:
'+' means one or more of the preceding element.
'?' means zero or one of the preceding element.
A vertical bar '|' separates alternatives.
Parentheses are used to define the scope and precedence of the operators.
Example 1