Company: Walmart_12march
Difficulty: medium
Hard to Navigate Security Code Problem Description In a city map, there are multiple streets that form a security code. Each street consists of four blocks. We say the security code is "hard to navigate" when there are two consecutive blocks on a street that have the same number. Given the current arrangement of blocks on the streets, represented by the security code S, determine if it is hard to navigate. If it is hard to navigate, print "Bad"; otherwise, print "Good." Input Contains one four-digit number. Input Format The first line contains an integer S having 4 digits. Output Format If it is hard to navigate, print "Bad"; otherwise, print "Good." Note: Output is case-sensitive Constraints S has four digits Examples Example 1: Input: 3776 Output: Bad Explanation: The second and third digits are the same, so 3776 is hard to navigate. Example 2: Input: 8080 Output: Good Explanation: There are no two consecutive digits that are the same, so 8080 is not hard to navigate.