#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 numbers[n];
  for (int i = 0; i < n;) {
    scanf("%d", &numbers[i]);
    if (numbers[i] % 2 == 1) {
      i++;
    }
  }
  for (int i = 0; i < n / 2; i++) {
    printf("%d\n", numbers[i] - numbers[n - 1 - i]);
  }
  if (n % 2 == 1) {
    printf("%d", numbers[n / 2]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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,-0x28(%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    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe71(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11b9 <main+0x99>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
cmp    %ecx,%eax
jge    1217 <main+0xf7>
mov    -0x28(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x20(%rbp),%ecx
movslq %ecx,%rcx
sub    (%rax,%rcx,4),%esi
lea    0xdff(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c5 <main+0xa5>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    124e <main+0x12e>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdb7(%rip),%rdi
call   1030 <printf@plt>
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,%r14
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    11f3 <main+0xd3>
xor    %ebx,%ebx
lea    0xe93(%rip),%r15
nopl   (%rax)
mov    %ebx,%r13d
lea    (%r12,%r13,4),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    (%r12,%r13,4),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
add    %ecx,%ebx
mov    -0x2c(%rbp),%eax
cmp    %eax,%ebx
jl     1170 <main+0x50>
cmp    $0x2,%eax
jl     11fd <main+0xdd>
mov    $0xffffffff,%r13d
xor    %ebx,%ebx
lea    0xe4f(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r12,%rbx,4),%esi
add    %r13d,%eax
cltq
sub    (%r12,%rax,4),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rdx
add    $0xffffffff,%r13d
cmp    %rdx,%rbx
jl     11c0 <main+0xa0>
jmp    1206 <main+0xe6>
mov    %eax,%ecx
neg    %ecx
shr    %ecx
neg    %ecx
jmp    1206 <main+0xe6>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
and    $0xfffffffe,%edx
sub    %edx,%eax
cmp    $0x1,%eax
jne    122a <main+0x10a>
movslq %ecx,%rax
mov    (%r12,%rax,4),%esi
lea    0xddb(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%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
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %3
%11 = alloca i32, i64 %9
store i64 %9, i64* %4
store i32 0, i32* %5
br label %12
12: ; preds = %30, %0
%13 = load i32, i32* %5
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %31
16: ; preds = %12
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %11, i64 %18
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %11, i64 %22
%24 = load i32, i32* %23
%25 = srem i32 %24, 2
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %30
27: ; preds = %16
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %30
30: ; preds = %27, %16
br label %12
31: ; preds = %12
store i32 0, i32* %6
br label %32
32: ; preds = %51, %31
%33 = load i32, i32* %6
%34 = load i32, i32* %2
%35 = sdiv i32 %34, 2
%36 = icmp slt i32 %33, %35
br i1 %36, label %37, label %54
37: ; preds = %32
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %11, i64 %39
%41 = load i32, i32* %40
%42 = load i32, i32* %2
%43 = sub nsw i32 %42, 1
%44 = load i32, i32* %6
%45 = sub nsw i32 %43, %44
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i32, i32* %11, i64 %46
%48 = load i32, i32* %47
%49 = sub nsw i32 %41, %48
%50 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %37
%52 = load i32, i32* %6
%53 = add nsw i32 %52, 1
store i32 %53, i32* %6
br label %32
54: ; preds = %32
%55 = load i32, i32* %2
%56 = srem i32 %55, 2
%57 = icmp eq i32 %56, 1
br i1 %57, label %58, label %65
58: ; preds = %54
%59 = load i32, i32* %2
%60 = sdiv i32 %59, 2
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %11, i64 %61
%63 = load i32, i32* %62
%64 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %63)
br label %65
65: ; preds = %58, %54
store i32 0, i32* %1
%66 = load i8*, i8** %3
%67 = load i32, i32* %1
ret i32 %67
}

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 %17, label %10
10: ; preds = %0
%11 = sub i32 0, %8
%12 = lshr i32 %11, 1
%13 = sub nsw i32 0, %12
br label %29
14: ; preds = %17
%15 = sdiv i32 %27, 2
%16 = icmp sgt i32 %27, 1
br i1 %16, label %34, label %29
17: ; preds = %0, %17
%18 = phi i32 [ %26, %17 ], [ 0, %0 ]
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %7, i64 %19
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %20)
%22 = load i32, i32* %20
%23 = srem i32 %22, 2
%24 = icmp eq i32 %23, 1
%25 = zext i1 %24 to i32
%26 = add nuw nsw i32 %18, %25
%27 = load i32, i32* %1
%28 = icmp slt i32 %26, %27
br i1 %28, label %17, label %14
29: ; preds = %34, %10, %14
%30 = phi i32 [ %27, %14 ], [ %8, %10 ], [ %48, %34 ]
%31 = phi i32 [ %15, %14 ], [ %13, %10 ], [ %49, %34 ]
%32 = srem i32 %30, 2
%33 = icmp eq i32 %32, 1
br i1 %33, label %52, label %57
34: ; preds = %14, %34
%35 = phi i64 [ %47, %34 ], [ 0, %14 ]
%36 = phi i32 [ %48, %34 ], [ %27, %14 ]
%37 = trunc i64 %35 to i32
%38 = getelementptr inbounds i32, i32* %7, i64 %35
%39 = load i32, i32* %38
%40 = xor i32 %37, -1
%41 = add i32 %36, %40
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i32, i32* %7, i64 %42
%44 = load i32, i32* %43
%45 = sub nsw i32 %39, %44
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %45)
%47 = add nuw nsw i64 %35, 1
%48 = load i32, i32* %1
%49 = sdiv i32 %48, 2
%50 = sext i32 %49 to i64
%51 = icmp slt i64 %47, %50
br i1 %51, label %34, label %29
52: ; preds = %29
%53 = sext i32 %31 to i64
%54 = getelementptr inbounds i32, i32* %7, i64 %53
%55 = load i32, i32* %54
%56 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %55)
br label %57
57: ; preds = %52, %29
ret i32 0
}