#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 mas[n], i = 0, p, b;
  do {
    scanf("%d", &mas[i]);
    if (mas[i] % 2 != 0)
      i++;
  } while (n > i);
  for (p = 0, i = n - 1; i >= p; p++, i--) {
    if (i != p) {
      b = mas[p] - mas[i];
      printf("%d\n", b);
    } else
      printf("%d", mas[p]);
  }
  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,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x30(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe7d(%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     11ad <main+0x8d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b2 <main+0x92>
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     116d <main+0x4d>
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jl     1242 <main+0x122>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
je     120f <main+0xef>
mov    -0x30(%rbp),%rcx
movslq -0x20(%rbp),%rax
mov    (%rcx,%rax,4),%eax
movslq -0x1c(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdfe(%rip),%rdi
call   1030 <printf@plt>
jmp    1226 <main+0x106>
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xddf(%rip),%rdi
call   1030 <printf@plt>
jmp    122b <main+0x10b>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%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
sub    $0x18,%rsp
lea    0xec8(%rip),%r14
lea    -0x2c(%rbp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rsp,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%r15d
lea    0x0(,%r15,4),%rsi
add    %r13,%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    0x0(%r13,%r15,4),%eax
and    $0x1,%eax
add    %eax,%ebx
mov    -0x2c(%rbp),%r12d
cmp    %ebx,%r12d
jg     1170 <main+0x50>
test   %r12d,%r12d
jle    1202 <main+0xe2>
movabs $0x100000000,%rbx
add    $0xffffffffffffffff,%r12
xor    %r14d,%r14d
mov    %rbx,%r15
jmp    11e7 <main+0xc7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
add    $0x1,%r14
mov    %r15,%rax
sar    $0x20,%rax
add    %rbx,%r15
lea    -0x1(%r12),%rcx
cmp    %rax,%r12
mov    %rcx,%r12
jle    1202 <main+0xe2>
mov    %r12d,%eax
mov    0x0(%r13,%r14,4),%esi
cmp    %rax,%r14
je     11c0 <main+0xa0>
sub    0x0(%r13,%r12,4),%esi
lea    0xe03(%rip),%rdi
jmp    11c7 <main+0xa7>
mov    -0x38(%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 = [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
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %3
%12 = alloca i32, i64 %10
store i64 %10, i64* %4
store i32 0, i32* %5
br label %13
13: ; preds = %28, %0
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %12, i64 %19
%21 = load i32, i32* %20
%22 = srem i32 %21, 2
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %13
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %27
27: ; preds = %24, %13
br label %28
28: ; preds = %27
%29 = load i32, i32* %2
%30 = load i32, i32* %5
%31 = icmp sgt i32 %29, %30
br i1 %31, label %13, label %32
32: ; preds = %28
store i32 0, i32* %6
%33 = load i32, i32* %2
%34 = sub nsw i32 %33, 1
store i32 %34, i32* %5
br label %35
35: ; preds = %62, %32
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = icmp sge i32 %36, %37
br i1 %38, label %39, label %67
39: ; preds = %35
%40 = load i32, i32* %5
%41 = load i32, i32* %6
%42 = icmp ne i32 %40, %41
br i1 %42, label %43, label %55
43: ; preds = %39
%44 = load i32, i32* %6
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %12, i64 %45
%47 = load i32, i32* %46
%48 = load i32, i32* %5
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i32, i32* %12, i64 %49
%51 = load i32, i32* %50
%52 = sub nsw i32 %47, %51
store i32 %52, i32* %7
%53 = load i32, i32* %7
%54 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %53)
br label %61
55: ; preds = %39
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %12, i64 %57
%59 = load i32, i32* %58
%60 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %59)
br label %61
61: ; preds = %55, %43
br label %62
62: ; preds = %61
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
%65 = load i32, i32* %5
%66 = add nsw i32 %65, -1
store i32 %66, i32* %5
br label %35
67: ; preds = %35
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
br label %8
8: ; preds = %8, %0
%9 = phi i32 [ 0, %0 ], [ %15, %8 ]
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %7, i64 %10
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = load i32, i32* %11
%14 = and i32 %13, 1
%15 = add nuw nsw i32 %14, %9
%16 = load i32, i32* %1
%17 = icmp sgt i32 %16, %15
br i1 %17, label %8, label %18
18: ; preds = %8
%19 = icmp sgt i32 %16, 0
br i1 %19, label %20, label %42
20: ; preds = %18
%21 = zext i32 %16 to i64
br label %22
22: ; preds = %20, %37
%23 = phi i64 [ 0, %20 ], [ %38, %37 ]
%24 = phi i64 [ %21, %20 ], [ %25, %37 ]
%25 = add nsw i64 %24, -1
%26 = and i64 %25, 4294967295
%27 = icmp eq i64 %26, %23
%28 = getelementptr inbounds i32, i32* %7, i64 %23
%29 = load i32, i32* %28
br i1 %27, label %35, label %30
30: ; preds = %22
%31 = getelementptr inbounds i32, i32* %7, i64 %25
%32 = load i32, i32* %31
%33 = sub nsw i32 %29, %32
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %37
35: ; preds = %22
%36 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %29)
br label %37
37: ; preds = %30, %35
%38 = add nuw i64 %23, 1
%39 = shl i64 %38, 32
%40 = ashr exact i64 %39, 32
%41 = icmp sgt i64 %25, %40
br i1 %41, label %22, label %42
42: ; preds = %37, %18
ret i32 0
}