#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 *, long long *, ...);
int main() {
  long long int t, N, K, i, num;
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld%lld", &N, &K);
    for (i = 0; i < K; i++)
      scanf("%d", &num);
    if (((N * (N + 1)) / 2) % 2 == 1)
      printf("\nMom");
    else
      printf("\nChef");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     11f9 <main+0xd9>
lea    0xe9f(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    11a9 <main+0x89>
lea    0xe7c(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1178 <main+0x58>
mov    -0x18(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x1,%rdx
jne    11e8 <main+0xc8>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
jmp    11f4 <main+0xd4>
lea    0xe22(%rip),%rdi
call   1030 <printf@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x30,%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    0xecf(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subq   $0x1,0x10(%rsp)
jae    115a <main+0x3a>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x8(%rsp),%r12
lea    0xea3(%rip),%r13
lea    0x20(%rsp),%rbx
lea    0xe9a(%rip),%rbp
lea    0xe98(%rip),%r14
jmp    11c3 <main+0xa3>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rax
lea    0x1(%rax),%rcx
imul   %rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
add    %rcx,%rax
mov    %rax,%rcx
sar    %rcx
shr    $0x3f,%rax
add    %rcx,%rax
and    $0xfffffffffffffffe,%rax
sub    %rax,%rcx
cmp    $0x1,%rcx
mov    %r14,%rdi
cmove  %rbp,%rdi
call   1030 <printf@plt>
subq   $0x1,0x10(%rsp)
jb     1149 <main+0x29>
lea    0xe36(%rip),%rdi
lea    0x18(%rsp),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpq   $0x0,0x8(%rsp)
jle    1180 <main+0x60>
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%r15
cmp    0x8(%rsp),%r15
jl     11f0 <main+0xd0>
jmp    1180 <main+0x60>

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [9 x i8] c"%lld%lld\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [5 x i8] c"\0AMom\00"
@.str.4 = [6 x i8] c"\0AChef\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
%7 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
br label %8
8: ; preds = %35, %0
%9 = load i64, i64* %2
%10 = add nsw i64 %9, -1
store i64 %10, i64* %2
%11 = icmp ne i64 %9, 0
br i1 %11, label %12, label %36
12: ; preds = %8
%13 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64* %3, i64* %4)
store i64 0, i64* %5
br label %14
14: ; preds = %20, %12
%15 = load i64, i64* %5
%16 = load i64, i64* %4
%17 = icmp slt i64 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i64* %6)
br label %20
20: ; preds = %18
%21 = load i64, i64* %5
%22 = add nsw i64 %21, 1
store i64 %22, i64* %5
br label %14
23: ; preds = %14
%24 = load i64, i64* %3
%25 = load i64, i64* %3
%26 = add nsw i64 %25, 1
%27 = mul nsw i64 %24, %26
%28 = sdiv i64 %27, 2
%29 = srem i64 %28, 2
%30 = icmp eq i64 %29, 1
br i1 %30, label %31, label %33
31: ; preds = %23
%32 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %35
33: ; preds = %23
%34 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %35
35: ; preds = %33, %31
br label %8
36: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [9 x i8] c"%lld%lld\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [5 x i8] c"\0AMom\00"
@.str.4 = [6 x i8] c"\0AChef\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %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*, i64*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%10 = load i64, i64* %1
%11 = add nsw i64 %10, -1
store i64 %11, i64* %1
%12 = icmp eq i64 %10, 0
br i1 %12, label %35, label %13
13: ; preds = %0, %23
%14 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64* %2, i64* %3)
%15 = load i64, i64* %3
%16 = icmp sgt i64 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %13, %17
%18 = phi i64 [ %20, %17 ], [ 0, %13 ]
%19 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i64* %4)
%20 = add nuw nsw i64 %18, 1
%21 = load i64, i64* %3
%22 = icmp slt i64 %20, %21
br i1 %22, label %17, label %23
23: ; preds = %17, %13
%24 = load i64, i64* %2
%25 = add nsw i64 %24, 1
%26 = mul nsw i64 %25, %24
%27 = sdiv i64 %26, 2
%28 = srem i64 %27, 2
%29 = icmp eq i64 %28, 1
%30 = select i1 %29, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0)
%31 = call i32 @printf(i8* dereferenceable(1) %30)
%32 = load i64, i64* %1
%33 = add nsw i64 %32, -1
store i64 %33, i64* %1
%34 = icmp eq i64 %32, 0
br i1 %34, label %35, label %13
35: ; preds = %23, %0
ret i32 0
}