The door of Snuke's laboratory is locked with a security code. The security code is a…
- User
The door of Snuke's laboratory is locked with a security code.
The security code is a 4-digit number. We say the security code is hard to enter when it contains two consecutive digits that are the same.
You are given the current security code S. If S is hard to enter, print
Bad; otherwise, printGood.Constraints
- S is a 4-character string consisting of digits. Input
Input is given from Standard Input in the following format:
S
Output
If S is hard to enter, print
Bad; otherwise, printGood.Examples
Input
3776
Output
Bad
Input
8080
Output
Good
Input
1333
Output
Bad
Input
0024
Output
Bad
Assistant
pythons = input().strip() print("Bad" if any(s[i] == s[i+1] for i in range(3)) else "Good")
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.