Killjee and Good Strings

0

0 votes
Easy
Problem

Killjee defines string to be GOOD or BAD in a weird way. If a string has 5 consecutive vowels or 3 consecutive consonants then it is a BAD string else it is a GOOD  string.

Killjee recently found a string S containing lower case alphabets and ?, he defines that this string is BAD only if after replacing all ? with any combination of lower case english alphabets, string remains BAD else it is GOOD. Help killjee finding if string is GOOD or BAD.

 

INPUT

only line of input contains string S.

OUTPUT

Print GOOD if string is good else print BAD.

CONSTRAINTS

1|S|2105

Sample Input
aaab?b
Sample Output
GOOD
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

aabab is not bad so, we found a combination to replace ? such that formed string is good. So, it is a good string.

Editor Image

?