eolymp
bolt
Try our new interface for solving problems
Problems

Jane`s First Words

Jane`s First Words

Jane (my ~\textbf{2} years-old baby daughter) has started speaking some simple words now. "\textit{\textbf{Daddy}}" and "\textit{\textbf{Mommy}}" are the two common first words. Hearing those words for the first time are 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's first call him: "daddy" (\textbf{or its variants}). This time, you will also write similar program. \InputFile You are given one word per line. These are the list of captured sounds. Each line contains only lowercase alphabet without any whitespaces and at most \textbf{20} characters. Input is terminated with an EOF. \OutputFile For each word/line, output "\textbf{She called me!!!}" in one line if that word matches this regular expression below. Otherwise, output "\textbf{Cooing}" in one line (to say that this is just some baby soft murmuring sound). \textit{\textbf{Note}}: Quotes are only for clarity. The regular expression (regex): "\textbf{da+dd?(i|y)}". If you are not familiar with regex, let me explain: \begin{itemize} \item '\textbf{+}' means one or more of the preceding element. \item '\textbf{?}' means zero or one of the preceding element. \item A vertical bar '\textbf{|}' separates alternatives. \item Parentheses are used to define the scope and precedence of the operators. \end{itemize}
Time limit 1 second
Memory limit 128 MiB
Input example #1
aaaa
eeeh
auwww
dda
daaada
daddy
ouuuww
dadi
Output example #1
Cooing
Cooing
Cooing
Cooing
Cooing
She called me!!!
Cooing
She called me!!!
Author Dr. Steven Halim
Source 2013 ACM-ICPC Thailand Southern Programming Contest, August 10, Problem F