#include<iostream>using namespace std;int main(){ int n; double a,b,c,d,e,f; cin>>n; while(n--) { cin>>a>>b>>c>>d>>e>>f; if (a*c==0) cout<<"parabola"<<endl; else { if(a==c) cout<<"circle"<<endl; else if(a*c>0) cout<<"ellipse"<<endl; else cout<<"hyperbola"<<endl; } } return 0;}


