#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; size_t pos = 0; while (!s.empty()) { if ((pos = s.find("ab")) != string::npos) { s.erase(pos, 2); } else { cout << "Bad" << endl; break; } } if (s.empty()) cout << "G...