#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 len, n_queries;
  scanf("%d %d", &len, &n_queries);
  int arr[len];
  for (int i = 0; i < len; ++i)
    scanf("%d", &arr[i]);
  for (int j = 1; j <= n_queries; ++j) {
    int type;
    scanf("%d", &type);
    if (type == 0) {
      int lower, upper;
      scanf("%d %d", &lower, &upper);
      if (arr[upper - 1] == 1)
        puts("ODD");
      else
        puts("EVEN");
    } else {
      int pos;
      scanf("%d", &pos);
      arr[pos - 1] = !arr[pos - 1];
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
xor    %eax,%eax
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11aa <main+0x8a>
mov    -0x40(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1173 <main+0x53>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1276 <main+0x156>
lea    0xe3f(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jne    1228 <main+0x108>
lea    0xe20(%rip),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x40(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1217 <main+0xf7>
lea    0xdf9(%rip),%rdi
call   1030 <puts@plt>
jmp    1223 <main+0x103>
lea    0xdec(%rip),%rdi
call   1030 <puts@plt>
jmp    1263 <main+0x143>
lea    0xdd4(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%edx
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1268 <main+0x148>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11b1 <main+0x91>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xec8(%rip),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x30(%rbp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rsp,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%r15
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    119e <main+0x7e>
lea    0xe93(%rip),%r14
mov    %r15,%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
add    $0x4,%r12
cmp    %rax,%rbx
jl     1180 <main+0x60>
cmpl   $0x0,-0x30(%rbp)
jle    1234 <main+0x114>
lea    0xe54(%rip),%rbx
lea    -0x3c(%rbp),%r14
lea    -0x38(%rbp),%r12
xor    %r13d,%r13d
jmp    11eb <main+0xcb>
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movslq -0x38(%rbp),%rax
xor    %ecx,%ecx
cmpl   $0x0,-0x4(%r15,%rax,4)
sete   %cl
mov    %ecx,-0x4(%r15,%rax,4)
add    $0x1,%r13d
cmp    -0x30(%rbp),%r13d
jge    1234 <main+0x114>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,-0x3c(%rbp)
jne    11c0 <main+0xa0>
lea    0xdfb(%rip),%rdi
mov    %r12,%rsi
lea    -0x34(%rbp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq -0x34(%rbp),%rax
cmpl   $0x1,-0x4(%r15,%rax,4)
lea    0xde2(%rip),%rdi
je     122d <main+0x10d>
lea    0xddd(%rip),%rdi
call   1030 <puts@plt>
jmp    11e1 <main+0xc1>
mov    -0x48(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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