#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, ...);
int main() {
  int n, i;
  char line[10000][20];
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; i++)
      scanf("%s", &line[i]);
    printf("%s", line[n - 1]);
    for (i = n - 2; i >= 0; i--)
      printf(" %s", line[i]);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30d50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%rax
je     120d <main+0xed>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1195 <main+0x75>
movslq -0xc(%rbp),%rax
lea    -0x30d50(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <main+0x3b>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
lea    -0x30d50(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     11fa <main+0xda>
movslq -0xc(%rbp),%rax
lea    -0x30d50(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    11c2 <main+0xa2>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x30d50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x30d58,%rsp
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
jne    1174 <main+0x44>
xor    %eax,%eax
add    $0x30d58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe89(%rip),%r13
lea    0xe81(%rip),%r14
lea    0xe77(%rip),%r15
lea    0xc(%rsp),%r12
jmp    11b3 <main+0x83>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x2e3a(%rip),%rcx
cmp    (%rcx),%rax
je     1160 <main+0x30>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11ef <main+0xbf>
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
add    $0x14,%rbx
cmp    %rax,%rbp
jl     11d0 <main+0xa0>
add    $0xffffffff,%eax
cltq
lea    (%rax,%rax,4),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x10,%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
jl     1190 <main+0x60>
add    $0xfffffffe,%eax
shl    $0x2,%rax
lea    (%rax,%rax,4),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rsp,%rbx,1),%rsi
add    $0x10,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffec,%rbx
cmp    $0xffffffffffffffec,%rbx
jne    1230 <main+0x100>
jmp    1190 <main+0x60>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c" %s\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10000 x [20 x i8]]
store i32 0, i32* %1
br label %5
5: ; preds = %43, %0
%6 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %45
9: ; preds = %5
store i32 0, i32* %3
br label %10
10: ; preds = %19, %9
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10000 x [20 x i8]], [10000 x [20 x i8]]* %4, i64 0, i64 %16
%18 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [20 x i8]* %17)
br label %19
19: ; preds = %14
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %10
22: ; preds = %10
%23 = load i32, i32* %2
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [10000 x [20 x i8]], [10000 x [20 x i8]]* %4, i64 0, i64 %25
%27 = getelementptr inbounds [20 x i8], [20 x i8]* %26, i64 0, i64 0
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %27)
%29 = load i32, i32* %2
%30 = sub nsw i32 %29, 2
store i32 %30, i32* %3
br label %31
31: ; preds = %40, %22
%32 = load i32, i32* %3
%33 = icmp sge i32 %32, 0
br i1 %33, label %34, label %43
34: ; preds = %31
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [10000 x [20 x i8]], [10000 x [20 x i8]]* %4, i64 0, i64 %36
%38 = getelementptr inbounds [20 x i8], [20 x i8]* %37, i64 0, i64 0
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %38)
br label %40
40: ; preds = %34
%41 = load i32, i32* %3
%42 = add nsw i32 %41, -1
store i32 %42, i32* %3
br label %31
43: ; preds = %31
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %5
45: ; preds = %5
ret i32 0
}

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