rt
#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while (t--){
int n,m;
cin>>n>>m;
int a[n+1],b[m+1];
for (int i=1;i<=n;i++) cin>>a[i];
for (int i=1;i<=m;i++) cin>>b[i];
int t1=1,t2=1;
while (t1<=n and t2<m){
if (a[t1]>=b[t2]) t2++;
else t1++;
}
if (t1>n){
cout<<"MechaGodzilla"<<endl;
}
else{
cout<<"Godzilla"<<endl;
}
}
return 0;
}