#include<bits/stdc++.h>
#define DIST(x1,x2, y1, y2) (((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
#define DIST3D(x1,x2, y1, y2, z1, z2) (((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)) + ((z1-z2)*(z1-z2)))
#define CLR(a) a.clear()
#define VCLR(a, n) for(int i=0; i<=n+3; i++) a[i].clear()
#define SIZE(a) a.size()
#define ERASE(a, b) memset(a, b, sizeof a)
#define PB(a, b) a.push_back(b)
#define PB2(a,i,b) a[i].push_back(b)
#define LL long long
#define ULL unsigned long long
#define DBG cout<<"I Am Here"<<endl
#define DBGA(a) cout<<a<<endl
#define DBGI(b,a) cout<<b<<' '<<a<<endl
#define DBGL(i,s,e,b) or(int i=s; i<=e; i++) cout<<b<<endl
#define INF 1e9
#define INV 1e-6
#define sc(a) scanf("%I64d", &a)
#define SC(a) scanf("%lld", &a)
#define pr(a) printf("%I64d\n", a)
#define PR(a) printf("%lld\n", a)
#define si(a) scanf("%d", &a)
#define pii pair<int,int>
#define PII pair<LL,LL>
#define MAX 600005
#define CASE(i) printf("Case %d: ", i);
#define PI acos(-1)
#define piis pair<int, string>
#define fast1 ios_base::sync_with_stdio(false);
#define fast2 cin.tie(0)
using namespace std;
LL MOD = 1000000007;
LL bigmod(LL a, LL b){
LL x = 1, y = a%MOD;
while(b > 0) {
if(b%2 == 1) {
x=(x*y);
if(x>MOD) x%=MOD;
}
y = (y*y);
if(y>MOD) y%=MOD;
b /= 2;
}
return x;
}
LL MODINVERSE(LL a){
return bigmod(a, MOD-2);
}
//LL dp[900][1000];
//LL NCR(int n, int r)
//{
// if(r==1) return n;
// else if(n==r) return 1;
// else
// {
// if(dp[n][r]!=-1) return dp[n][r];
// else
// {
// dp[n][r]=NCR(n-1,r) + NCR(n-1,r-1);
// return dp[n][r];
// }
// }
//}
bool flag;
struct node{
bool endmark;
node *next[27];
node()
{
endmark = false;
for(int i=0; i<26; i++) next[i] = NULL;
}
}*root;
void INSERT(string str, int len)
{
node *curr = root;
for(int i=0; i<len; i++)
{
int idx = str[i] - 'a';
if(curr->next[idx]==NULL)
curr->next[idx] = new node();
curr = curr->next[idx];
}
curr->endmark = true;
}
bool SEARCH(string str, int len)
{
flag = false;
node *curr = root;
for(int i=0; i<len; i++)
{
int idx = str[i] - 'a';
if(curr->next[idx]==NULL) return false;
curr = curr->next[idx];
if(curr->endmark==true && i+1!=len) flag = true;
}
return curr->endmark;
}
void DELETE(node *curr)
{
for(int i=0; i<26; i++)
if(curr->next[i]) DELETE(curr->next[i]);
delete (curr);
}
string arr[100005];
int main()
{
int n;
while(scanf("%d", &n)&& n>0){
root = new node();
map<string, int>mymap;
mymap.clear();
bool check = false;
for(int i=0; i<n; i++)
{
string str;
cin>>str;
arr[i] = str;
if(mymap[str]>0) check = true;
mymap[str]++;
INSERT(str, str.size());
}
if(check){
printf("Conjunto Ruim\n");
continue;
}
bool found = false;
for(int i=0; i<n; i++)
{
string str;
str = arr[i];
SEARCH(str, str.size());
if(flag)
found = true;
}
if(!found)
puts("Conjunto Bom");
else
puts("Conjunto Ruim");
DELETE(root);
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBESVNUKHgxLHgyLCB5MSwgeTIpICgoKHgxLXgyKSooeDEteDIpKSsoKHkxLXkyKSooeTEteTIpKSkKI2RlZmluZSBESVNUM0QoeDEseDIsIHkxLCB5MiwgejEsIHoyKSAoKCh4MS14MikqKHgxLXgyKSkrKCh5MS15MikqKHkxLXkyKSkgKyAoKHoxLXoyKSooejEtejIpKSkKI2RlZmluZSBDTFIoYSkgYS5jbGVhcigpCiNkZWZpbmUgVkNMUihhLCBuKSBmb3IoaW50IGk9MDsgaTw9biszOyBpKyspIGFbaV0uY2xlYXIoKQojZGVmaW5lIFNJWkUoYSkgYS5zaXplKCkKI2RlZmluZSBFUkFTRShhLCBiKSBtZW1zZXQoYSwgYiwgc2l6ZW9mIGEpCiNkZWZpbmUgUEIoYSwgYikgYS5wdXNo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7CiAgICAgICAgaWYoYiUyID09IDEpIHsKICAgICAgICAgICAgeD0oeCp5KTsKICAgICAgICAgICAgaWYoeD5NT0QpIHglPU1PRDsKICAgICAgICB9CiAgICAgICAgeSA9ICh5KnkpOwogICAgICAgIGlmKHk+TU9EKSB5JT1NT0Q7CiAgICAgICAgYiAvPSAyOwogICAgfQogICAgcmV0dXJuIHg7Cn0KCkxMIE1PRElOVkVSU0UoTEwgYSl7CiAgICByZXR1cm4gYmlnbW9kKGEsIE1PRC0yKTsKfQoKLy9MTCBkcFs5MDBdWzEwMDBdOwovL0xMIE5DUihpbnQgbiwgaW50IHIpCi8vewovLyAgICBpZihyPT0xKSByZXR1cm4gbjsKLy8gICAgZWxzZSBpZihuPT1yKSByZXR1cm4gMTsKLy8gICAgZWxzZQovLyAgICB7Ci8vICAgICAgICBpZihkcFtuXVtyXSE9LTEpIHJldHVybiBkcFtuXVtyXTsKLy8gICAgICAgIGVsc2UKLy8gICAgICAgIHsKLy8gICAgICAgICAgICBkcFtuXVtyXT1OQ1Iobi0xLHIpICsgTkNSKG4tMSxyLTEpOwovLyAgICAgICAgICAgIHJldHVybiBkcFtuXVtyXTsKLy8gICAgICAgIH0KLy8gICAgfQovL30KCmJvb2wgZmxhZzsKCnN0cnVjdCBub2RlewogICAgYm9vbCBlbmRtYXJrOwogICAgbm9kZSAqbmV4dFsyN107CiAgICBub2RlKCkKICAgIHsKICAgICAgICBlbmRtYXJrID0gZmFsc2U7CiAgICAgICAgZm9yKGludCBpPTA7IGk8MjY7IGkrKykgIG5leHRbaV0gPSBOVUxMOwogICAgfQp9KnJvb3Q7Cgp2b2lkIElOU0VSVChzdHJpbmcgc3RyLCBpbnQgbGVuKQp7CiAgICBub2RlICpjdXJyID0gcm9vdDsKICAgIGZvcihpbnQgaT0wOyBpPGxlbjsgaSsrKQogICAgewogICAgICAgIGludCBpZHggPSBzdHJbaV0gLSAnYSc7CiAgICAgICAgaWYoY3Vyci0+bmV4dFtpZHhdPT1OVUxMKQogICAgICAgICAgICBjdXJyLT5uZXh0W2lkeF0gPSBuZXcgbm9kZSgpOwogICAgICAgIGN1cnIgPSBjdXJyLT5uZXh0W2lkeF07CiAgICB9CiAgICBjdXJyLT5lbmRtYXJrID0gdHJ1ZTsKfQoKYm9vbCBTRUFSQ0goc3RyaW5nIHN0ciwgaW50IGxlbikKewogICAgZmxhZyA9IGZhbHNlOwogICAgbm9kZSAqY3VyciA9IHJvb3Q7CiAgICBmb3IoaW50IGk9MDsgaTxsZW47IGkrKykKICAgIHsKICAgICAgICBpbnQgaWR4ID0gc3RyW2ldIC0gJ2EnOwogICAgICAgIGlmKGN1cnItPm5leHRbaWR4XT09TlVMTCkgcmV0dXJuIGZhbHNlOwogICAgICAgIGN1cnIgPSBjdXJyLT5uZXh0W2lkeF07CiAgICAgICAgaWYoY3Vyci0+ZW5kbWFyaz09dHJ1ZSAmJiBpKzEhPWxlbikgZmxhZyA9IHRydWU7CiAgICB9CiAgICByZXR1cm4gY3Vyci0+ZW5kbWFyazsKfQoKdm9pZCBERUxFVEUobm9kZSAqY3VycikKewogICAgZm9yKGludCBpPTA7IGk8MjY7IGkrKykKICAgICAgICBpZihjdXJyLT5uZXh0W2ldKSBERUxFVEUoY3Vyci0+bmV4dFtpXSk7CiAgICBkZWxldGUgKGN1cnIpOwp9CgpzdHJpbmcgYXJyWzEwMDAwNV07CgppbnQgbWFpbigpCnsKICAgIGludCBuOwogICAgd2hpbGUoc2NhbmYoIiVkIiwgJm4pJiYgbj4wKXsKICAgICAgICByb290ID0gbmV3IG5vZGUoKTsKICAgICAgICBtYXA8c3RyaW5nLCBpbnQ+bXltYXA7CiAgICAgICAgbXltYXAuY2xlYXIoKTsKICAgICAgICBib29sIGNoZWNrID0gZmFsc2U7CgogICAgICAgIGZvcihpbnQgaT0wOyBpPG47IGkrKykKICAgICAgICB7CiAgICAgICAgICAgIHN0cmluZyBzdHI7CiAgICAgICAgICAgIGNpbj4+c3RyOwogICAgICAgICAgICBhcnJbaV0gPSBzdHI7CiAgICAgICAgICAgIGlmKG15bWFwW3N0cl0+MCkgY2hlY2sgPSB0cnVlOwogICAgICAgICAgICBteW1hcFtzdHJdKys7CiAgICAgICAgICAgIElOU0VSVChzdHIsIHN0ci5zaXplKCkpOwogICAgICAgIH0KICAgICAgICBpZihjaGVjayl7CiAgICAgICAgICAgIHByaW50ZigiQ29uanVudG8gUnVpbVxuIik7CiAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgIH0KICAgICAgICBib29sIGZvdW5kID0gZmFsc2U7CiAgICAgICAgZm9yKGludCBpPTA7IGk8bjsgaSsrKQogICAgICAgIHsKICAgICAgICAgICAgc3RyaW5nIHN0cjsKICAgICAgICAgICAgc3RyID0gYXJyW2ldOwogICAgICAgICAgICBTRUFSQ0goc3RyLCBzdHIuc2l6ZSgpKTsKICAgICAgICAgICAgaWYoZmxhZykKICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTsKICAgICAgICB9CiAgICAgICAgaWYoIWZvdW5kKQogICAgICAgICAgICBwdXRzKCJDb25qdW50byBCb20iKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHB1dHMoIkNvbmp1bnRvIFJ1aW0iKTsKICAgICAgICBERUxFVEUocm9vdCk7CiAgICB9CiAgICByZXR1cm4gMDsKfQoK