#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 *, ...);
scalar_t__ strcmp(char *, char *);
int main() {
  int n;
  scanf("%d", &n);
  char buffer[2][13];
  scanf("%s", buffer[0]);
  char flags = 0;
  int i;
  for (i = 1; i < n; i++) {
    scanf("%s", buffer[i & 1]);
    flags |= (1 << (i & 1 ? (strcmp(buffer[0], buffer[1]) < 0)
                          : (strcmp(buffer[0], buffer[1]) > 0)));
  }
  printf(flags == 3   ? "NEITHER\n"
         : flags == 1 ? "DECREASING\n"
                      : "INCREASING\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x30(%rbp),%rsi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
movb   $0x0,-0x31(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1212 <main+0xe2>
mov    -0x38(%rbp),%eax
and    $0x1,%eax
cltq
lea    -0x30(%rbp),%rsi
imul   $0xd,%rax,%rax
add    %rax,%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x38(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     11cf <main+0x9f>
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
add    $0xd,%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x3c(%rbp)
jmp    11ef <main+0xbf>
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
add    $0xd,%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
movsbl -0x31(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x31(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    116e <main+0x3e>
movsbl -0x31(%rbp),%eax
cmp    $0x3,%eax
jne    122f <main+0xff>
lea    0xde0(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    124c <main+0x11c>
movsbl -0x31(%rbp),%edx
lea    0xde1(%rip),%rax
lea    0xdce(%rip),%rcx
cmp    $0x1,%edx
cmove  %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xebb(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeab(%rip),%rdi
lea    0x10(%rsp),%r12
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x2,0xc(%rsp)
jl     1209 <main+0xd9>
mov    $0x1,%ebx
lea    0x1d(%rsp),%r14
lea    0xe80(%rip),%r15
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%ebp
and    $0x1,%ebp
lea    0x0(,%rbp,2),%rax
add    %rbp,%rax
lea    0x0(,%rax,4),%rsi
add    %rbp,%rsi
or     %r12,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
xor    %edx,%edx
test   %rax,%rax
sets   %cl
setg   %dl
test   %ebp,%ebp
cmove  %edx,%ecx
bts    %ecx,%r13d
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1190 <main+0x60>
cmp    $0x3,%r13d
lea    0xe19(%rip),%rax
lea    0xe27(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%r13d
lea    0xe0c(%rip),%rdi
cmovne %rcx,%rdi
jmp    1210 <main+0xe0>
lea    0xe0b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"NEITHER\0A\00"
@.str.3 = [12 x i8] c"DECREASING\0A\00"
@.str.4 = [12 x i8] c"INCREASING\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [13 x i8]]
%3 = bitcast i32* %1 to i8*
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = getelementptr inbounds [2 x [13 x i8]], [2 x [13 x i8]]* %2, i64 0, i64 0, i64 0
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %34
9: ; preds = %0
%10 = getelementptr inbounds [2 x [13 x i8]], [2 x [13 x i8]]* %2, i64 0, i64 1, i64 0
br label %11
11: ; preds = %9, %11
%12 = phi i32 [ 1, %9 ], [ %26, %11 ]
%13 = phi i32 [ 0, %9 ], [ %25, %11 ]
%14 = and i32 %12, 1
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds [2 x [13 x i8]], [2 x [13 x i8]]* %2, i64 0, i64 %15, i64 0
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = icmp eq i32 %14, 0
%19 = call i64 @strcmp(i8* %5, i8* %10)
%20 = icmp slt i64 %19, 0
%21 = icmp sgt i64 %19, 0
%22 = select i1 %18, i1 %21, i1 %20
%23 = zext i1 %22 to i32
%24 = shl nuw nsw i32 1, %23
%25 = or i32 %24, %13
%26 = add nuw nsw i32 %12, 1
%27 = load i32, i32* %1
%28 = icmp slt i32 %26, %27
br i1 %28, label %11, label %29
29: ; preds = %11
%30 = icmp eq i32 %25, 3
%31 = select i1 %30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0)
%32 = icmp eq i32 %25, 1
%33 = select i1 %32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %31
br label %34
34: ; preds = %29, %0
%35 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), %0 ], [ %33, %29 ]
%36 = call i32 @printf(i8* dereferenceable(1) %35)
ret i32 0
}