my code is having an error in one testcase that i can’t find out. please help me kindly
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
while(n--){
string a;
string str1="101",str2="010";
cin>>a;
int str=a.find(str1);
int ps=a.find(str2),count=0;
if (str==-1){
if(ps==-1){
count=1;
}
}
if(count==0){
cout<<"GOOD"<<endl;
}
else{
cout<<"BAD"<<endl;
}
}
return 0;
}