#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 *, ...);
int main() {
  int i, j, c, len, num, temp, t, res, k;
  scanf("%d", &t);
  while (t--) {
    c = 0;
    scanf("%d %d", &num, &k);
    for (i = 0; i < num; i++) {
      scanf("%d", &temp);
      c += temp;
      c %= 2;
    }
    if (c == 0) {
      if (k == 1)
        printf("odd\n");
      else
        printf("even\n");
    } else {
      printf("even\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x20(%rbp)
cmp    $0x0,%eax
je     1203 <main+0xe3>
movl   $0x0,-0x10(%rbp)
lea    0xe9d(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11bc <main+0x9c>
lea    0xe77(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1179 <main+0x59>
cmpl   $0x0,-0x10(%rbp)
jne    11f2 <main+0xd2>
cmpl   $0x1,-0x28(%rbp)
jne    11e1 <main+0xc1>
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    11ed <main+0xcd>
lea    0xe23(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <main+0xde>
lea    0xe12(%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    $0x18,%rsp
lea    0xece(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0x8(%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    0x10(%rsp),%r12
lea    0xe9e(%rip),%r13
lea    0x14(%rsp),%rbx
lea    0xe95(%rip),%rbp
jmp    119f <main+0x7f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpl   $0x1,0x10(%rsp)
mov    %rbp,%rdi
lea    0xe7c(%rip),%rax
cmove  %rax,%rdi
call   1030 <puts@plt>
subl   $0x1,0x8(%rsp)
jb     1148 <main+0x28>
lea    0xe5a(%rip),%rdi
lea    0xc(%rsp),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1180 <main+0x60>
xor    %r15d,%r15d
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    0x14(%rsp),%r14d
mov    %r14d,%eax
shr    $0x1f,%eax
add    %r14d,%eax
and    $0xfffffffe,%eax
sub    %eax,%r14d
add    $0x1,%r15d
cmp    0xc(%rsp),%r15d
jl     11d0 <main+0xb0>
mov    %rbp,%rdi
test   %r14d,%r14d
jne    1193 <main+0x73>
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 = [5 x i8] c"odd\0A\00"
@.str.3 = [6 x i8] c"even\0A\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
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
br label %12
12: ; preds = %45, %0
%13 = load i32, i32* %8
%14 = add nsw i32 %13, -1
store i32 %14, i32* %8
%15 = icmp ne i32 %13, 0
br i1 %15, label %16, label %46
16: ; preds = %12
store i32 0, i32* %4
%17 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %6, i32* %10)
store i32 0, i32* %2
br label %18
18: ; preds = %29, %16
%19 = load i32, i32* %2
%20 = load i32, i32* %6
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %32
22: ; preds = %18
%23 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%24 = load i32, i32* %7
%25 = load i32, i32* %4
%26 = add nsw i32 %25, %24
store i32 %26, i32* %4
%27 = load i32, i32* %4
%28 = srem i32 %27, 2
store i32 %28, i32* %4
br label %29
29: ; preds = %22
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %18
32: ; preds = %18
%33 = load i32, i32* %4
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %43
35: ; preds = %32
%36 = load i32, i32* %10
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %42
40: ; preds = %35
%41 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %42
42: ; preds = %40, %38
br label %45
43: ; preds = %32
%44 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %45
45: ; preds = %43, %42
br label %12
46: ; preds = %12
ret i32 0
}

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