#K13801. Happy String Check

    ID: 23993 Type: Default 1000ms 256MiB

Happy String Check

Happy String Check

Given a string consisting of lowercase English letters, determine whether the string is a happy string. A happy string is defined as one where no two consecutive characters are identical. More formally, for a string ( s ) of length ( n ), it is happy if for every ( i ) with ( 0 \leq i < n-1 ), ( s_i \neq s_{i+1} ).

For example, the string "abc" is happy, while "aab" is not.

inputFormat

Input consists of a single line containing the string to be checked. The string contains only lowercase English letters and might be empty.

outputFormat

Output a single line: print "True" if the string is a happy string (i.e. no two adjacent characters are the same), otherwise print "False".## sample

abc
True