#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*/ puts(char *);
scalar_t__ scanf(char *, int *);
int main() {
  int num_digits;
  while (scanf("%d\n", &num_digits) != EOF) {
    switch (num_digits) {
    case 2:
      puts("00");
      puts("01");
      puts("81");
      break;
    case 4:
      puts("0000");
      puts("0001");
      puts("2025");
      puts("3025");
      puts("9801");
      break;
    case 6:
      puts("000000");
      puts("000001");
      puts("088209");
      puts("494209");
      puts("998001");
      break;
    case 8:
      puts("00000000");
      puts("00000001");
      puts("04941729");
      puts("07441984");
      puts("24502500");
      puts("25502500");
      puts("52881984");
      puts("60481729");
      puts("99980001");
      break;
    default:
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     129e <main+0x17e>
mov    -0x8(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x6,%eax
ja     1294 <main+0x174>
mov    -0x10(%rbp),%rax
lea    0xe91(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xe89(%rip),%rdi
call   1030 <puts@plt>
jmp    1299 <main+0x179>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe55(%rip),%rdi
call   1030 <puts@plt>
jmp    1299 <main+0x179>
lea    0xe60(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5d(%rip),%rdi
call   1030 <puts@plt>
lea    0xe31(%rip),%rdi
call   1030 <puts@plt>
lea    0xe2c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe27(%rip),%rdi
call   1030 <puts@plt>
jmp    1299 <main+0x179>
lea    0xe1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xe1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe17(%rip),%rdi
call   1030 <puts@plt>
lea    0xe14(%rip),%rdi
call   1030 <puts@plt>
lea    0xe11(%rip),%rdi
call   1030 <puts@plt>
lea    0xe0e(%rip),%rdi
call   1030 <puts@plt>
lea    0xe0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe08(%rip),%rdi
call   1030 <puts@plt>
lea    0xe05(%rip),%rdi
call   1030 <puts@plt>
jmp    1299 <main+0x179>
jmp    1299 <main+0x179>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
jmp    11b1 <main+0x91>
lea    0xf10(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
lea    0xf06(%rip),%r15
lea    0xf08(%rip),%r14
lea    0xf0a(%rip),%rbx
lea    0xf0c(%rip),%rbp
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r14,%rax
mov    %rbx,%r13
mov    %rbp,%r12
mov    %rax,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
lea    0xe64(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2e1f(%rip),%rcx
cmp    (%rcx),%rax
je     124a <main+0x12a>
mov    0x4(%rsp),%eax
add    $0xfffffffe,%eax
cmp    $0x6,%eax
ja     11b1 <main+0x91>
lea    0xe1f(%rip),%rdx
movslq (%rdx,%rax,4),%rcx
add    %rdx,%rcx
lea    0xe5c(%rip),%rdi
lea    0xe5e(%rip),%r15
lea    0xe26(%rip),%r14
lea    0xe24(%rip),%rbx
lea    0xe22(%rip),%rbp
lea    0xe3b(%rip),%rax
lea    0xe3d(%rip),%r13
lea    0xe00(%rip),%r12
jmp    *%rcx
lea    0xe20(%rip),%rdi
lea    0xe22(%rip),%r15
lea    0xdfb(%rip),%r14
lea    0xdfb(%rip),%rbx
lea    0xdfb(%rip),%rbp
jmp    1183 <main+0x63>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i64 0
@.str.1 = [3 x i8] c"00\00"
@.str.2 = [3 x i8] c"01\00"
@.str.3 = [3 x i8] c"81\00"
@.str.4 = [5 x i8] c"0000\00"
@.str.5 = [5 x i8] c"0001\00"
@.str.6 = [5 x i8] c"2025\00"
@.str.7 = [5 x i8] c"3025\00"
@.str.8 = [5 x i8] c"9801\00"
@.str.9 = [7 x i8] c"000000\00"
@.str.10 = [7 x i8] c"000001\00"
@.str.11 = [7 x i8] c"088209\00"
@.str.12 = [7 x i8] c"494209\00"
@.str.13 = [7 x i8] c"998001\00"
@.str.14 = [9 x i8] c"00000000\00"
@.str.15 = [9 x i8] c"00000001\00"
@.str.16 = [9 x i8] c"04941729\00"
@.str.17 = [9 x i8] c"07441984\00"
@.str.18 = [9 x i8] c"24502500\00"
@.str.19 = [9 x i8] c"25502500\00"
@.str.20 = [9 x i8] c"52881984\00"
@.str.21 = [9 x i8] c"60481729\00"
@.str.22 = [9 x i8] c"99980001\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %36, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %37
7: ; preds = %3
%8 = load i32, i32* %2
switch i32 %8, label %35 [
i32 2, label %9
i32 4, label %13
i32 6, label %19
i32 8, label %25
]
9: ; preds = %7
%10 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %36
13: ; preds = %7
%14 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %36
19: ; preds = %7
%20 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%21 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%22 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%23 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%24 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
br label %36
25: ; preds = %7
%26 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%27 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%28 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
%29 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%30 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0))
%31 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0))
%32 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
%33 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%34 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i64 0, i64 0))
br label %36
35: ; preds = %7
br label %36
36: ; preds = %35, %25, %19, %13, %9
br label %3
37: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i64 0
@.str.1 = [3 x i8] c"00\00"
@.str.2 = [3 x i8] c"01\00"
@.str.3 = [3 x i8] c"81\00"
@.str.4 = [5 x i8] c"0000\00"
@.str.5 = [5 x i8] c"0001\00"
@.str.6 = [5 x i8] c"2025\00"
@.str.7 = [5 x i8] c"3025\00"
@.str.8 = [5 x i8] c"9801\00"
@.str.9 = [7 x i8] c"000000\00"
@.str.10 = [7 x i8] c"000001\00"
@.str.11 = [7 x i8] c"088209\00"
@.str.12 = [7 x i8] c"494209\00"
@.str.13 = [7 x i8] c"998001\00"
@.str.14 = [9 x i8] c"00000000\00"
@.str.15 = [9 x i8] c"00000001\00"
@.str.16 = [9 x i8] c"04941729\00"
@.str.17 = [9 x i8] c"07441984\00"
@.str.18 = [9 x i8] c"24502500\00"
@.str.19 = [9 x i8] c"25502500\00"
@.str.20 = [9 x i8] c"52881984\00"
@.str.21 = [9 x i8] c"60481729\00"
@.str.22 = [9 x i8] c"99980001\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %33, label %6
6: ; preds = %0, %29
%7 = load i32, i32* %1
switch i32 %7, label %29 [
i32 2, label %22
i32 4, label %14
i32 6, label %8
i32 8, label %9
]
8: ; preds = %6
br label %14
9: ; preds = %6
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
br label %14
14: ; preds = %6, %9, %8
%15 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), %8 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), %6 ]
%16 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), %8 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), %6 ]
%17 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), %8 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %6 ]
%18 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), %8 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %6 ]
%19 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), %8 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), %6 ]
%20 = call i32 @puts(i8* dereferenceable(1) %15)
%21 = call i32 @puts(i8* dereferenceable(1) %16)
br label %22
22: ; preds = %14, %6
%23 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %6 ], [ %17, %14 ]
%24 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %6 ], [ %18, %14 ]
%25 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), %6 ], [ %19, %14 ]
%26 = call i32 @puts(i8* dereferenceable(1) %23)
%27 = call i32 @puts(i8* dereferenceable(1) %24)
%28 = call i32 @puts(i8* dereferenceable(1) %25)
br label %29
29: ; preds = %22, %6
%30 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%31 = load i64, i64* @EOF
%32 = icmp eq i64 %30, %31
br i1 %32, label %33, label %6
33: ; preds = %29, %0
ret i32 0
}