#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 /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int N, w, h, i, j;
  scanf("%d %d %d", &N, &w, &h);
  for (i = 1; i <= h; i++) {
    for (j = 1; j <= w; j++) {
      if (i == 1) {
        printf("%d", N);
      }
      if (i == h) {
        printf("%d", N);
      }
      if (j == 1) {
        printf("%d", N);
      }
      if (j == w) {
        printf("%d", N);
      } else {
        printf(" ");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1216 <main+0xf6>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1203 <main+0xe3>
cmpl   $0x1,-0x14(%rbp)
jne    1188 <main+0x68>
mov    -0x8(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11a5 <main+0x85>
mov    -0x8(%rbp),%esi
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x18(%rbp)
jne    11c0 <main+0xa0>
mov    -0x8(%rbp),%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11e2 <main+0xc2>
mov    -0x8(%rbp),%esi
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f0 <main+0xd0>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f5 <main+0xd5>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1161 <main+0x41>
jmp    1208 <main+0xe8>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114e <main+0x2e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1266 <main+0x136>
mov    $0x1,%ebx
mov    0x8(%rsp),%ecx
lea    0xe97(%rip),%r14
jmp    1191 <main+0x61>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp),%eax
lea    0x1(%rbx),%edx
cmp    %eax,%ebx
mov    %edx,%ebx
jge    1266 <main+0x136>
test   %ecx,%ecx
jle    1184 <main+0x54>
cmp    $0x1,%ebx
jne    11ac <main+0x7c>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,%ebx
jne    11be <main+0x8e>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x1,0x8(%rsp)
jne    11f0 <main+0xc0>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11fa <main+0xca>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%ecx
cmp    $0x2,%ecx
jl     1180 <main+0x50>
mov    $0x1,%ebp
jmp    1226 <main+0xf6>
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%ecx
cmp    %ecx,%ebp
jge    1180 <main+0x50>
cmp    $0x1,%ebx
jne    1239 <main+0x109>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebx
jne    1250 <main+0x120>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0x8(%rsp),%ebp
jne    1210 <main+0xe0>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    121a <main+0xea>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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