aboutsummaryrefslogtreecommitdiff
path: root/codechef/ChefAndFeedBack/main.cpp
blob: 8f04fc8acbf40281e1cc7807cd0c0702521d6997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<bits/stdc++.h>


using namespace std;

int main () {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int tt;
	cin >> tt;
  string str1 = "010";
  string str2 = "101";
	while(tt--){
    string s;
    cin >> s;
    int found1 = s.find(str1);
    int found2 = s.find(str2);
    if(found1 != string::npos || found2 != string::npos) {
      cout << "Good" << endl;
    } else {
      cout << "Bad" << endl;
    }
	}
}