#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int odds[n];
  int i = 0;
  while (i < n) {
    scanf("%d", &odds[i]);
    if (odds[i] % 2) {
      i++;
    }
  }
  int left_index = 0, right_index = n - 1;
  int result;
  while (left_index <= right_index) {
    result = (left_index != right_index) ? odds[left_index] - odds[right_index]
                                         : odds[left_index];
    printf("%d\n", result);
    left_index++;
    right_index--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11be <main+0x9e>
mov    -0x30(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe71(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b9 <main+0x99>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     123a <main+0x11a>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     1200 <main+0xe0>
mov    -0x30(%rbp),%rcx
movslq -0x20(%rbp),%rax
mov    (%rcx,%rax,4),%eax
movslq -0x24(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x34(%rbp)
jmp    120e <main+0xee>
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
lea    0xde5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    11ce <main+0xae>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%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
push   %rax
lea    0xecb(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,%rbx
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    11da <main+0xba>
mov    %rbx,%r13
xor    %ebx,%ebx
lea    0xe95(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %ebx,%r14d
lea    (%r12,%r14,4),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    (%r12,%r14,4),%eax
and    $0x1,%eax
add    %eax,%ebx
mov    -0x2c(%rbp),%r14d
cmp    %r14d,%ebx
jl     1170 <main+0x50>
test   %r14d,%r14d
mov    %r13,%rbx
jle    11da <main+0xba>
add    $0xffffffffffffffff,%r14
xor    %r13d,%r13d
lea    0xe5c(%rip),%r15
jmp    11c8 <main+0xa8>
nopl   0x0(%rax)
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%r13
lea    -0x1(%r14),%rax
cmp    %r14,%r13
mov    %rax,%r14
jge    11da <main+0xba>
mov    %r14d,%eax
mov    (%r12,%r13,4),%esi
cmp    %rax,%r13
je     11b0 <main+0x90>
sub    (%r12,%r14,4),%esi
jmp    11b0 <main+0x90>
mov    %rbx,%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 = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %3
%13 = alloca i32, i64 %11
store i64 %11, i64* %4
store i32 0, i32* %5
br label %14
14: ; preds = %32, %0
%15 = load i32, i32* %5
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %33
18: ; preds = %14
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %13, i64 %20
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %13, i64 %24
%26 = load i32, i32* %25
%27 = srem i32 %26, 2
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %18
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %32
32: ; preds = %29, %18
br label %14
33: ; preds = %14
store i32 0, i32* %6
%34 = load i32, i32* %2
%35 = sub nsw i32 %34, 1
store i32 %35, i32* %7
br label %36
36: ; preds = %59, %33
%37 = load i32, i32* %6
%38 = load i32, i32* %7
%39 = icmp sle i32 %37, %38
br i1 %39, label %40, label %67
40: ; preds = %36
%41 = load i32, i32* %6
%42 = load i32, i32* %7
%43 = icmp ne i32 %41, %42
br i1 %43, label %44, label %54
44: ; preds = %40
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i32, i32* %13, i64 %46
%48 = load i32, i32* %47
%49 = load i32, i32* %7
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %13, i64 %50
%52 = load i32, i32* %51
%53 = sub nsw i32 %48, %52
br label %59
54: ; preds = %40
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %13, i64 %56
%58 = load i32, i32* %57
br label %59
59: ; preds = %54, %44
%60 = phi i32 [ %53, %44 ], [ %58, %54 ]
store i32 %60, i32* %8
%61 = load i32, i32* %8
%62 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %61)
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
%65 = load i32, i32* %7
%66 = add nsw i32 %65, -1
store i32 %66, i32* %7
br label %36
67: ; preds = %36
store i32 0, i32* %1
%68 = load i8*, i8** %3
%69 = load i32, i32* %1
ret i32 %69
}

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