unittest
{
	assert( [ "3776" ].parse.expand.solve == "Bad" );
	assert( [ "8080" ].parse.expand.solve == "Good" );
	assert( [ "1333" ].parse.expand.solve == "Bad" );
	assert( [ "0024" ].parse.expand.solve == "Bad" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto s = input.front.to!( dchar[] );
	return tuple( s );
}

auto solve( dchar[] s )
{
	return ( s[ 0 ] == s[ 1 ] || s[ 1 ] == s[ 2 ] || s[ 2 ] == s[ 3 ] ) ? "Bad" : "Good";
}
