#include<bits/stdc++.h>
#define ll long long int
#define F first
#define S second
#define pb push_back
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y);
#define sdl(x) scanf("%lld",&x)
#define sd2l(x,y) scanf("%lld%lld",&x,&y);
#define sz(x) (int)(x.size())
#define nax 100010
#define inf 1001000100
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define MOD 1000000007
#define mp make_pair
#define pc pair<char ,int>
#define pi pair<int ,int>
#define pii pair <int,pi>
#define ull unsigned long long int
#define eps 1e-9
using namespace std;
int main() {
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
int t;
sd(t);
while(t--)
{
int b1,p1,b2,p2;
sd2(b1, p1);
sd2(b2, p2);
if(b1 == 0)
{
if(b2 == 0)
puts("Lazy");
else
puts("Congrats");
continue;
}
if(b2 == 0)
{
puts("HaHa");
continue;
}
double v1 = p1 * log(b1);
double v2 = p2 * log(b2);
if(abs(v1 - v2) < eps)
puts("Lazy");
else if(v1 > v2)
puts("HaHa");
else
puts("Congrats");
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBsbCBsb25nIGxvbmcgaW50CiNkZWZpbmUgRiBmaXJzdAojZGVmaW5lIFMgc2Vjb25kCiNkZWZpbmUgcGIgcHVzaF9iYWNrCiNkZWZpbmUgc2QoeCkgc2NhbmYoIiVkIiwmeCkKI2RlZmluZSBzZDIoeCx5KSBzY2FuZigiJWQlZCIsJngsJnkpOwojZGVmaW5lIHNkbCh4KSBzY2FuZigiJWxsZCIsJngpCiNkZWZpbmUgc2QybCh4LHkpIHNjYW5mKCIlbGxkJWxsZCIsJngsJnkpOwojZGVmaW5lIHN6KHgpIChpbnQpKHguc2l6ZSgpKQojZGVmaW5lIG5heCAxMDAwMTAKI2RlZmluZSBpbmYgMTAwMTAwMDEwMAojZGVmaW5lIGZhc3RpbyBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTtjaW4udGllKE5VTEwpO2NvdXQudGllKE5VTEwpOwojZGVmaW5lIE1PRCAxMDAwMDAwMDA3CiNkZWZpbmUgbXAgbWFrZV9wYWlyCiNkZWZpbmUgcGMgcGFpcjxjaGFyICxpbnQ+CiNkZWZpbmUgcGkgcGFpcjxpbnQgLGludD4KI2RlZmluZSBwaWkgcGFpciA8aW50LHBpPgojZGVmaW5lIHVsbCB1bnNpZ25lZCBsb25nIGxvbmcgaW50CiNkZWZpbmUgZXBzIDFlLTkKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4oKSB7CiAgICAvL2ZyZW9wZW4oImlucHV0LnR4dCIsInIiLHN0ZGluKTsKICAgIC8vZnJlb3Blbigib3V0cHV0LnR4dCIsInciLHN0ZG91dCk7CiAgICBpbnQgdDsKICAgIHNkKHQpOwogICAgd2hpbGUodC0tKQogICAgewogICAgICBpbnQgYjEscDEsYjIscDI7CiAgICAgIHNkMihiMSwgcDEpOwogICAgICBzZDIoYjIsIHAyKTsKICAgICAgaWYoYjEgPT0gMCkKICAgICAgewogICAgICAgICAgaWYoYjIgPT0gMCkKICAgICAgICAgICAgICBwdXRzKCJMYXp5Iik7CiAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgcHV0cygiQ29uZ3JhdHMiKTsKICAgICAgICAgICAgY29udGludWU7CiAgICAgIH0KICAgICAgaWYoYjIgPT0gMCkKICAgICAgewogICAgICAgICAgcHV0cygiSGFIYSIpOwogICAgICAgICAgY29udGludWU7CiAgICAgIH0KICAgICAgZG91YmxlIHYxICA9IHAxICogbG9nKGIxKTsKICAgICAgZG91YmxlIHYyID0gcDIgKiBsb2coYjIpOwogICAgICBpZihhYnModjEgLSB2MikgPCBlcHMpCiAgICAgICAgcHV0cygiTGF6eSIpOwogICAgICBlbHNlIGlmKHYxID4gdjIpCiAgICAgICAgcHV0cygiSGFIYSIpOwogICAgICBlbHNlCiAgICAgICAgcHV0cygiQ29uZ3JhdHMiKTsKICAgIH0KICAgIHJldHVybiAwOwogfQ==