#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int T, q, i, j, maxI, maxJ;
  scanf("%d", &T);
  while (T--) {
    scanf("%d %d", &i, &j);
    maxI = 0;
    while (i--) {
      scanf("%d", &q);
      if (maxI < q) {
        maxI = q;
      }
    }
    maxJ = 0;
    while (j--) {
      scanf("%d", &q);
      if (maxJ < q) {
        maxJ = q;
      }
    }
    if (maxI >= maxJ) {
      puts("Godzilla");
    } else {
      puts("MechaGodzilla");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1221 <main+0x101>
lea    0xea4(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     11af <main+0x8f>
lea    0xe76(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11aa <main+0x8a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1172 <main+0x52>
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     11f3 <main+0xd3>
lea    0xe32(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ee <main+0xce>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11b6 <main+0x96>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     1210 <main+0xf0>
lea    0xe05(%rip),%rdi
call   1030 <puts@plt>
jmp    121c <main+0xfc>
lea    0xdef(%rip),%rdi
call   1030 <puts@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xece(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0x14(%rsp)
jae    1159 <main+0x39>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x8(%rsp),%r12
lea    0xea6(%rip),%r14
lea    0xe97(%rip),%r13
lea    0x10(%rsp),%rbx
jmp    119d <main+0x7d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %ebp,%r15d
mov    %r14,%rdi
lea    0xe79(%rip),%rax
cmovl  %rax,%rdi
call   1030 <puts@plt>
subl   $0x1,0x14(%rsp)
jb     1148 <main+0x28>
lea    0xe5c(%rip),%rdi
lea    0xc(%rsp),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0xc(%rsp)
mov    $0x0,%r15d
jb     11ef <main+0xcf>
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    %eax,%r15d
cmovl  %eax,%r15d
subl   $0x1,0xc(%rsp)
jae    11d0 <main+0xb0>
xor    %ebp,%ebp
subl   $0x1,0x8(%rsp)
jb     1180 <main+0x60>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    %eax,%ebp
cmovl  %eax,%ebp
subl   $0x1,0x8(%rsp)
jae    1200 <main+0xe0>
jmp    1180 <main+0x60>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [9 x i8] c"Godzilla\00"
@.str.3 = [14 x i8] c"MechaGodzilla\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %9
9: ; preds = %48, %0
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
%12 = icmp ne i32 %10, 0
br i1 %12, label %13, label %49
13: ; preds = %9
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5)
store i32 0, i32* %6
br label %15
15: ; preds = %26, %13
%16 = load i32, i32* %4
%17 = add nsw i32 %16, -1
store i32 %17, i32* %4
%18 = icmp ne i32 %16, 0
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%21 = load i32, i32* %6
%22 = load i32, i32* %3
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = load i32, i32* %3
store i32 %25, i32* %6
br label %26
26: ; preds = %24, %19
br label %15
27: ; preds = %15
store i32 0, i32* %7
br label %28
28: ; preds = %39, %27
%29 = load i32, i32* %5
%30 = add nsw i32 %29, -1
store i32 %30, i32* %5
%31 = icmp ne i32 %29, 0
br i1 %31, label %32, label %40
32: ; preds = %28
%33 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%34 = load i32, i32* %7
%35 = load i32, i32* %3
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = load i32, i32* %3
store i32 %38, i32* %7
br label %39
39: ; preds = %37, %32
br label %28
40: ; preds = %28
%41 = load i32, i32* %6
%42 = load i32, i32* %7
%43 = icmp sge i32 %41, %42
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %48
46: ; preds = %40
%47 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %46, %44
br label %9
49: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [9 x i8] c"Godzilla\00"
@.str.3 = [14 x i8] c"MechaGodzilla\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, -1
store i32 %11, i32* %1
%12 = icmp eq i32 %10, 0
br i1 %12, label %49, label %13
13: ; preds = %0, %41
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
%17 = icmp eq i32 %15, 0
br i1 %17, label %18, label %23
18: ; preds = %23, %13
%19 = phi i32 [ 0, %13 ], [ %28, %23 ]
%20 = load i32, i32* %4
%21 = add nsw i32 %20, -1
store i32 %21, i32* %4
%22 = icmp eq i32 %20, 0
br i1 %22, label %41, label %32
23: ; preds = %13, %23
%24 = phi i32 [ %28, %23 ], [ 0, %13 ]
%25 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%26 = load i32, i32* %2
%27 = icmp slt i32 %24, %26
%28 = select i1 %27, i32 %26, i32 %24
%29 = load i32, i32* %3
%30 = add nsw i32 %29, -1
store i32 %30, i32* %3
%31 = icmp eq i32 %29, 0
br i1 %31, label %18, label %23
32: ; preds = %18, %32
%33 = phi i32 [ %37, %32 ], [ 0, %18 ]
%34 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%35 = load i32, i32* %2
%36 = icmp slt i32 %33, %35
%37 = select i1 %36, i32 %35, i32 %33
%38 = load i32, i32* %4
%39 = add nsw i32 %38, -1
store i32 %39, i32* %4
%40 = icmp eq i32 %38, 0
br i1 %40, label %41, label %32
41: ; preds = %32, %18
%42 = phi i32 [ 0, %18 ], [ %37, %32 ]
%43 = icmp slt i32 %19, %42
%44 = select i1 %43, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
%45 = call i32 @puts(i8* dereferenceable(1) %44)
%46 = load i32, i32* %1
%47 = add nsw i32 %46, -1
store i32 %47, i32* %1
%48 = icmp eq i32 %46, 0
br i1 %48, label %49, label %13
49: ; preds = %41, %0
ret i32 0
}