1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#include <stdio.h> #include <iostream> using namespace std; int main() { int n,a,b,c,d,aa,bb,ans,t; cin>>t; while(t--) { cin>>a>>b>>c>>d; aa=a-c-1; bb=b-d-1; ans=aa^bb^c^d; if(ans==0) cout<<"Hansel\n"; else cout<<"Gretel\n"; } return 0; } |