#include <iostream>
#include <stack>
using namespace std;
stack<char> s;
int main(){
string in;
cin >> in;
for(int i=0;i<in.size();i++){
s.push(in[i]);
}
int cnt1 = 0;
int cnt2 = 0;
char temp;
int chk = 1;
while(!s.empty()){
temp = s.top();
s.pop();
if(temp == ')'){
cnt2++;
}
else{
cnt1++;
}
if(cnt2<cnt1){
chk = 0;
}
}
if(temp == ')'){
chk = 0;
}
if(chk == 1){
cout << "good";
}
else{
cout << "bad";
}
}