#K35212. Taco Happiness Check
Taco Happiness Check
Taco Happiness Check
You are given a string. Your task is to check whether the string contains at least one occurrence of two identical characters consecutively. Formally, if there exists an index \( i \) such that \( s[i]=s[i+1] \), then the string is considered to be "Happy"; otherwise, it is "Not Happy".
For example, the string good
is Happy because it has two consecutive 'o' characters, whereas swim
is Not Happy.
inputFormat
The input consists of a single line, which is the string \( s \) to be checked. The string can contain alphabetic characters and has no spaces.
outputFormat
Print a single line containing either Happy
or Not Happy
depending on whether the input string has any two identical consecutive characters.
good
Happy