#include<iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
for(int i=1;i<=n;++i) {
int a,q,p;
cin>>a>>q>>p;
if((q+p>140)&&((q*3+p*7)>=800)) cout<<"Excellent\n";
else cout<<"Not excellent\n";
}
return 0;
}