ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > Epoka Science Olympiad 2016 > задача:


11-3. 50969 - Chef and Feedback

Epoka Science Olympiad 2016

Старт: 11.апр.2016 в 14:07:57
Финиш: 24.апр.2016 в 05:00:00
Турнир завершён!
• Турнирная таблица

Задачи турнира

• 10-5. 50966 - TVSH
• 10-P1. 50901 - Sum of Cubes-1
• 10-P2. 50902 - Translate Score into...
• 10-P3. 50903 - Basic Math Calculator
• 10-P4. 50904 - Print All Prime Numbers
• 10-P5. 50905 - Convert KPH to MPH
• 11-1. 50967 - Finding Square Roots
• 11-2. 50968 - Number of Letters
• 11-3. 50969 - Chef and Feedback
• 11-4. 50970 - Marbles
• 11-5. 50971 - Belote Game
• 11-P1. 50906 - The Smallest Pair
• 11-P2. 50907 - Second Largest
• 11-P3. 50908 - Buy 1 Get 1
• 11-P4. 50909 - Gold Coins
• 11-P5. 50910 - Flipping Coins
• 6-1. 50937 - Calculate the Average

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

Chef and Feedback

Many geeky customers visit our chef's restaurant every day. Therefore, when asked to fill the feedback form, these customers represent the feedback using a binary string (i.e. a string that contains only characters '0' and '1').

Now since chef is not that great in deciphering binary strings, he has decided the following criteria to classify the feedback as Good or Bad :

If the string contains the substring "010" or "101", then the feedback is Good, else it is Bad. Note that, to be Good it is not necessary to have both of them as substring.

So given some binary strings, you need to output whether according to the chef, the strings are Good or Bad.

Input

The first line contains an integer T denoting the number of feedbacks. Each of the next T lines contains a string composed of only '0' and '1'.

Output

For every test case, print in a single line Good or Bad as per the Chef's method of classification.

Constraints

  • 1 T100
  • 1 |S| 105

Sum of length of all strings in one test file will not exceed 6*106.

Sample Input1:

Sample Input2:

2

11111110

10101010101010

3

110110110

001001

101010

Sample Output1:

Sample Output2:

Bad

Good

Good

Good

Good

 

 

 

 

 

 

 

Explanation of Sample 1:

Case 1 (11111110)               : The string does not contain 010 or 101 as substrings.
Case 2 (
10101010101010) : The string contains both 010 and 101 as substrings.

Для отправки решений необходимо выполнить вход.

www.contester.ru