#include<bits/stdc++.h>
#define LL long long
#define F(x,y,z) for(int i=x;i<=y;i+=z)
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int n,num[1005];
double study[1005],other[1005];
cin>>n;
F(1,n,1)
{
cin>>num[i]>>study[i]>>other[i];
}
F(1,n,1)
{
if(study[i]*0.7+other[i]*0.3>=80.0&&study[i]+other[i]>140.0&&study[i]*7+other[i]*3>=800.0)
{
cout<<"Excellent"<<'\n';
}
else
{
cout<<"Not excellent"<<'\n';
}
}
return 0;
}