/*
#include <stdio.h>
#include <string.h>
char stack[201];
int top=-1;
void push(char data)
{
top++;
stack[top]=data;
}
char pop()
{
if(top!=-1)
{
return stack[top--];
}
}
int main()
{
char num[201]={};
int n, i,cnt=0;
scanf("%d %s",&n,num);
for(i=n-1;i>=0;i--)
{
push(num[i]);
cnt++;
if(cnt%3==0)
{
push(',');
}
}
if(strlen(num)%3==0)
{
top--;
}
while(top!=-1)
{
printf("%c", pop());
}
return 0;
}
#include <stdio.h>
#include <string.h>
int stack[201];
int top=-1;
void push(int a)
{
stack[++top]=a;
}
void pop()
{
if(top!=-1)
top--;
}
void toptop()
{
if(top==-1)
{
printf("-1\n");
}
else
{
printf("%d\n", stack[top]);
}
}
void size()
{
printf("%d\n", top+1);
}
void empty()
{
if(top==-1)
printf("true\n");
else
printf("false\n");
}
int main()
{
char str[201];
int n, i, j, num=0;
scanf("%d\n", &n);
for(i=0;i<n;i++)
{
gets(str);
if(str[0]=='t') toptop();
else if(str[1]=='u')
{
for(j=6;str[j]!=' ';j++)
{
num=num*10+str[j]-'0';
}
push(num);
num=0;
}
else if(str[0]=='p') pop();
else if(str[0]=='s') size();
else if(str[0]=='e')empty();
}
return 0;
}
*/
#include <stdio.h>
#include <string.h>
int top=0;
int main()
{
char a[50001];
scanf("%s",a);
for(i=0;a[i]!=0;i++)
{
if(a[i]=='(')
top++;
else
top--;
if(top<0)
{
printf("bad");
return 0;
}
}
if(top==0) printf("good");
else printf("bad");
return 0;
}