#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int t;
  unsigned long long int i, mechg, god, godarmy, mecharmy, strength;
  scanf("%d", &t);
  while (t--) {
    god = 0;
    mechg = 0;
    scanf("%llu%llu", &godarmy, &mecharmy);
    long long int max1 = 0, max2 = 0;
    for (i = 0; i < godarmy; i++) {
      scanf("%llu", &strength);
      if (max1 == 0)
        max1 = strength;
      else if (strength > max1)
        max1 = strength;
    }
    long long int j = 0, k = 0;
    for (i = 0; i < mecharmy; i++) {
      scanf("%llu", &strength);
      if (max2 == 0)
        max2 = strength;
      else if (strength > max2)
        max2 = strength;
    }
    if (max1 >= max2)
      printf("Godzilla\n");
    else
      printf("MechaGodzilla\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%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     12ad <main+0x18d>
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
lea    0xe97(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    11fc <main+0xdc>
lea    0xe5f(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpq   $0x0,-0x40(%rbp)
jne    11cb <main+0xab>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    11e6 <main+0xc6>
mov    -0x38(%rbp),%rax
cmp    -0x40(%rbp),%rax
jbe    11e1 <main+0xc1>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    11e6 <main+0xc6>
jmp    11eb <main+0xcb>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1193 <main+0x73>
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    127d <main+0x15d>
lea    0xdde(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpq   $0x0,-0x48(%rbp)
jne    124c <main+0x12c>
mov    -0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    1267 <main+0x147>
mov    -0x38(%rbp),%rax
cmp    -0x48(%rbp),%rax
jbe    1262 <main+0x142>
mov    -0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    1267 <main+0x147>
jmp    126c <main+0x14c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1214 <main+0xf4>
mov    -0x40(%rbp),%rax
cmp    -0x48(%rbp),%rax
jl     129c <main+0x17c>
lea    0xd7f(%rip),%rdi
call   1030 <printf@plt>
jmp    12a8 <main+0x188>
lea    0xd69(%rip),%rdi
call   1030 <printf@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xecb(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0xc(%rsp)
jae    1159 <main+0x39>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xea7(%rip),%rbx
lea    0x10(%rsp),%r13
jmp    1193 <main+0x73>
nopw   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cmp    %rbp,%r15
lea    0xe95(%rip),%rdi
lea    0xe89(%rip),%rax
cmovl  %rax,%rdi
call   1030 <puts@plt>
subl   $0x1,0xc(%rsp)
jb     1148 <main+0x28>
lea    0xe69(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpq   $0x0,0x20(%rsp)
je     11f0 <main+0xd0>
xor    %ebp,%ebp
mov    %rbx,%r14
xor    %ebx,%ebx
mov    %rbx,%r15
nopl   (%rax)
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%rax
cmp    %rbx,%rax
cmova  %rax,%r15
test   %rbx,%rbx
cmove  %rax,%r15
add    $0x1,%rbp
mov    %r15,%rbx
cmp    0x20(%rsp),%rbp
jb     11c0 <main+0xa0>
jmp    11f6 <main+0xd6>
xor    %r15d,%r15d
mov    %rbx,%r14
mov    %r14,%rbx
cmpq   $0x0,0x18(%rsp)
je     1170 <main+0x50>
xor    %r12d,%r12d
xor    %r14d,%r14d
mov    %r14,%rbp
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%rax
cmp    %r14,%rax
cmova  %rax,%rbp
test   %r14,%r14
cmove  %rax,%rbp
add    $0x1,%r12
mov    %rbp,%r14
cmp    0x18(%rsp),%r12
jb     1210 <main+0xf0>
jmp    1172 <main+0x52>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%llu%llu\00"
@.str.2 = [5 x i8] c"%llu\00"
@.str.3 = [10 x i8] c"Godzilla\0A\00"
@.str.4 = [15 x i8] c"MechaGodzilla\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i32 0, i32* %1
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %14
14: ; preds = %71, %0
%15 = load i32, i32* %2
%16 = add nsw i32 %15, -1
store i32 %16, i32* %2
%17 = icmp ne i32 %15, 0
br i1 %17, label %18, label %72
18: ; preds = %14
store i64 0, i64* %5
store i64 0, i64* %4
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64* %6, i64* %7)
store i64 0, i64* %9
store i64 0, i64* %10
store i64 0, i64* %3
br label %20
20: ; preds = %38, %18
%21 = load i64, i64* %3
%22 = load i64, i64* %6
%23 = icmp ult i64 %21, %22
br i1 %23, label %24, label %41
24: ; preds = %20
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64* %8)
%26 = load i64, i64* %9
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = load i64, i64* %8
store i64 %29, i64* %9
br label %37
30: ; preds = %24
%31 = load i64, i64* %8
%32 = load i64, i64* %9
%33 = icmp ugt i64 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = load i64, i64* %8
store i64 %35, i64* %9
br label %36
36: ; preds = %34, %30
br label %37
37: ; preds = %36, %28
br label %38
38: ; preds = %37
%39 = load i64, i64* %3
%40 = add i64 %39, 1
store i64 %40, i64* %3
br label %20
41: ; preds = %20
store i64 0, i64* %11
store i64 0, i64* %12
store i64 0, i64* %3
br label %42
42: ; preds = %60, %41
%43 = load i64, i64* %3
%44 = load i64, i64* %7
%45 = icmp ult i64 %43, %44
br i1 %45, label %46, label %63
46: ; preds = %42
%47 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64* %8)
%48 = load i64, i64* %10
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %46
%51 = load i64, i64* %8
store i64 %51, i64* %10
br label %59
52: ; preds = %46
%53 = load i64, i64* %8
%54 = load i64, i64* %10
%55 = icmp ugt i64 %53, %54
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = load i64, i64* %8
store i64 %57, i64* %10
br label %58
58: ; preds = %56, %52
br label %59
59: ; preds = %58, %50
br label %60
60: ; preds = %59
%61 = load i64, i64* %3
%62 = add i64 %61, 1
store i64 %62, i64* %3
br label %42
63: ; preds = %42
%64 = load i64, i64* %9
%65 = load i64, i64* %10
%66 = icmp sge i64 %64, %65
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %71
69: ; preds = %63
%70 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %71
71: ; preds = %69, %67
br label %14
72: ; preds = %14
ret i32 0
}

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