#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*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int map[100];
  int n, i, j;
  freopen("input.txt", "r", stdin);
  map[0] = 0;
  map[1] = 1;
  for (i = 2; i < 100; i++) {
    map[i] = map[i - 1] + map[i - 2];
  }
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; i++) {
      printf("0");
      for (j = 1; j < 2 * i + 1; j++) {
        printf(" %d", map[j]);
      }
      printf("\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
lea    0xea7(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1040 <freopen@plt>
movl   $0x0,-0x1a0(%rbp)
movl   $0x1,-0x19c(%rbp)
movl   $0x2,-0x1a8(%rbp)
cmpl   $0x64,-0x1a8(%rbp)
jge    11d6 <main+0xa6>
mov    -0x1a8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1a0(%rbp,%rax,4),%ecx
mov    -0x1a8(%rbp),%eax
sub    $0x2,%eax
cltq
add    -0x1a0(%rbp,%rax,4),%ecx
movslq -0x1a8(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1183 <main+0x53>
jmp    11db <main+0xab>
lea    0xe2d(%rip),%rdi
lea    -0x1a4(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2deb(%rip),%rcx
cmp    (%rcx),%rax
je     12a3 <main+0x173>
movl   $0x0,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    129e <main+0x16e>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
mov    -0x1a8(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    127c <main+0x14c>
movslq -0x1ac(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1232 <main+0x102>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1208 <main+0xd8>
jmp    11db <main+0xab>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
mov    0x2e90(%rip),%rax
mov    (%rax),%edx
lea    0xe9f(%rip),%rdi
lea    0xea2(%rip),%rsi
call   1050 <freopen@plt>
movabs $0x100000000,%rax
mov    %rax,0x10(%rsp)
movl   $0x1,0x18(%rsp)
mov    $0x1,%eax
mov    $0x6,%ecx
xchg   %ax,%ax
add    -0x4(%rsp,%rcx,4),%eax
mov    %eax,0x4(%rsp,%rcx,4)
cmp    $0x66,%rcx
je     11bb <main+0x7b>
add    (%rsp,%rcx,4),%eax
mov    %eax,0x8(%rsp,%rcx,4)
mov    0x4(%rsp,%rcx,4),%edx
add    %eax,%edx
mov    %edx,0xc(%rsp,%rcx,4)
add    %edx,%eax
mov    %eax,0x10(%rsp,%rcx,4)
add    $0x4,%rcx
jmp    1190 <main+0x50>
lea    0xe4b(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x2e0d(%rip),%rcx
cmp    (%rcx),%rax
jne    11ec <main+0xac>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe19(%rip),%r13
lea    0xe13(%rip),%r14
lea    0xc(%rsp),%r15
jmp    1227 <main+0xe7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    0x2dbe(%rip),%rcx
cmp    (%rcx),%rax
je     11d8 <main+0x98>
cmpl   $0x0,0xc(%rsp)
jle    1210 <main+0xd0>
xor    %ebx,%ebx
jmp    1258 <main+0x118>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jge    1210 <main+0xd0>
mov    $0x30,%edi
call   1030 <putchar@plt>
test   %rbx,%rbx
je     1240 <main+0x100>
lea    (%rbx,%rbx,1),%rbp
add    $0x1,%rbp
mov    $0x1,%r12d
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x10(%rsp,%r12,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r12
cmp    %rbp,%r12
jb     1280 <main+0x140>
jmp    1240 <main+0x100>

LLVM IR (-O0):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.3 = [2 x i8] c"0\00"
@.str.4 = [4 x i8] c" %d\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* @stdin
%11 = call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
store i32 0, i32* %12
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 1
store i32 1, i32* %13
store i32 2, i32* %8
br label %14
14: ; preds = %32, %2
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 100
br i1 %16, label %17, label %35
17: ; preds = %14
%18 = load i32, i32* %8
%19 = sub nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %20
%22 = load i32, i32* %21
%23 = load i32, i32* %8
%24 = sub nsw i32 %23, 2
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = add nsw i32 %22, %27
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %30
store i32 %28, i32* %31
br label %32
32: ; preds = %17
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
store i32 %34, i32* %8
br label %14
35: ; preds = %14
br label %36
36: ; preds = %67, %35
%37 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%38 = load i64, i64* @EOF
%39 = icmp ne i64 %37, %38
br i1 %39, label %40, label %68
40: ; preds = %36
store i32 0, i32* %8
br label %41
41: ; preds = %64, %40
%42 = load i32, i32* %8
%43 = load i32, i32* %7
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %67
45: ; preds = %41
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %9
br label %47
47: ; preds = %59, %45
%48 = load i32, i32* %9
%49 = load i32, i32* %8
%50 = mul nsw i32 2, %49
%51 = add nsw i32 %50, 1
%52 = icmp slt i32 %48, %51
br i1 %52, label %53, label %62
53: ; preds = %47
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %53
%60 = load i32, i32* %9
%61 = add nsw i32 %60, 1
store i32 %61, i32* %9
br label %47
62: ; preds = %47
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %64
64: ; preds = %62
%65 = load i32, i32* %8
%66 = add nsw i32 %65, 1
store i32 %66, i32* %8
br label %41
67: ; preds = %41
br label %36
68: ; preds = %36
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.4 = [4 x i8] c" %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i32]
%4 = alloca i32
%5 = bitcast [100 x i32]* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = load i32, i32* @stdin
%8 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
store i32 0, i32* %9
%10 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 1
store i32 1, i32* %10
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 2
store i32 1, i32* %11
br label %16
12: ; preds = %16
%13 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%14 = load i64, i64* @EOF
%15 = icmp eq i64 %13, %14
br i1 %15, label %70, label %48
16: ; preds = %27, %2
%17 = phi i64 [ 3, %2 ], [ %43, %27 ]
%18 = phi i32 [ 1, %2 ], [ %41, %27 ]
%19 = phi i64 [ 2, %2 ], [ %38, %27 ]
%20 = add nsw i64 %19, -1
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %20
%22 = load i32, i32* %21
%23 = add nsw i32 %22, %18
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %17
store i32 %23, i32* %24
%25 = add nuw nsw i64 %17, 1
%26 = icmp eq i64 %25, 100
br i1 %26, label %12, label %27
27: ; preds = %16
%28 = add nsw i64 %17, -1
%29 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = add nsw i32 %30, %23
%32 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %25
store i32 %31, i32* %32
%33 = add nuw nsw i64 %17, 2
%34 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %17
%35 = load i32, i32* %34
%36 = add nsw i32 %35, %31
%37 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %33
store i32 %36, i32* %37
%38 = add nuw nsw i64 %17, 3
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %25
%40 = load i32, i32* %39
%41 = add nsw i32 %40, %36
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %38
store i32 %41, i32* %42
%43 = add nuw nsw i64 %17, 4
br label %16
44: ; preds = %64, %48
%45 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%46 = load i64, i64* @EOF
%47 = icmp eq i64 %45, %46
br i1 %47, label %70, label %48
48: ; preds = %12, %44
%49 = load i32, i32* %4
%50 = icmp sgt i32 %49, 0
br i1 %50, label %51, label %44
51: ; preds = %48, %64
%52 = phi i64 [ %66, %64 ], [ 0, %48 ]
%53 = call i32 @putchar(i32 48)
%54 = shl nuw nsw i64 %52, 1
%55 = or i64 %54, 1
%56 = icmp eq i64 %52, 0
br i1 %56, label %64, label %57
57: ; preds = %51, %57
%58 = phi i64 [ %62, %57 ], [ 1, %51 ]
%59 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %60)
%62 = add nuw nsw i64 %58, 1
%63 = icmp ult i64 %62, %55
br i1 %63, label %57, label %64
64: ; preds = %57, %51
%65 = call i32 @putchar(i32 10)
%66 = add nuw nsw i64 %52, 1
%67 = load i32, i32* %4
%68 = sext i32 %67 to i64
%69 = icmp slt i64 %66, %68
br i1 %69, label %51, label %44
70: ; preds = %44, %12
ret i32 0
}