#include <iostream>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int m,n,r,c;
cin>>m>>n>>r>>c;
int a=r,b=m-r-1,x=c,y=n-c-1;
if(a^b^x^y)
cout<<"Gretel"<<endl;
else
cout<<"Hansel"<<endl;
}
}
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int m,n,r,c;
cin>>m>>n>>r>>c;
int a=r,b=m-r-1,x=c,y=n-c-1;
if(a^b^x^y)
cout<<"Gretel"<<endl;
else
cout<<"Hansel"<<endl;
}
}
Comments
Post a Comment