#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, x, y;
  scanf("%d %d %d", &n, &w, &h);
  for (x = h; x >= 1; x--) {
    for (y = w; y >= 1; y--) {
      if (x == 1 || y == 1 || x == h || y == w)
        printf("%d", n);
      else {
        printf(" ");
      }
    }
    printf("\n");
  }
  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>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     11e6 <main+0xc6>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jl     11ca <main+0xaa>
cmpl   $0x1,-0x14(%rbp)
je     1193 <main+0x73>
cmpl   $0x1,-0x18(%rbp)
je     1193 <main+0x73>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1193 <main+0x73>
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11a9 <main+0x89>
mov    -0x8(%rbp),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bc <main+0x9c>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    115d <main+0x3d>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x2d>
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    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x4(%rsp),%ebx
test   %ebx,%ebx
jle    11ca <main+0x9a>
lea    0xea4(%rip),%r14
jmp    1184 <main+0x54>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
jle    11ca <main+0x9a>
mov    0x8(%rsp),%eax
test   %eax,%eax
jle    1170 <main+0x40>
mov    %eax,%ebp
jmp    11aa <main+0x7a>
mov    0xc(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x2,%ebp
jb     1170 <main+0x40>
add    $0xffffffff,%ebp
mov    0x8(%rsp),%eax
cmp    $0x1,%ebx
je     1190 <main+0x60>
cmp    $0x1,%ebp
je     1190 <main+0x60>
cmp    0x4(%rsp),%ebx
je     1190 <main+0x60>
cmp    %eax,%ebp
je     1190 <main+0x60>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11a3 <main+0x73>
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"
@.str.3 = [2 x i8] c"\0A\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)
%8 = load i32, i32* %4
store i32 %8, i32* %5
br label %9
9: ; preds = %42, %0
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 1
br i1 %11, label %12, label %45
12: ; preds = %9
%13 = load i32, i32* %3
store i32 %13, i32* %6
br label %14
14: ; preds = %37, %12
%15 = load i32, i32* %6
%16 = icmp sge i32 %15, 1
br i1 %16, label %17, label %40
17: ; preds = %14
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, 1
br i1 %19, label %31, label %20
20: ; preds = %17
%21 = load i32, i32* %6
%22 = icmp eq i32 %21, 1
br i1 %22, label %31, label %23
23: ; preds = %20
%24 = load i32, i32* %5
%25 = load i32, i32* %4
%26 = icmp eq i32 %24, %25
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i32, i32* %6
%29 = load i32, i32* %3
%30 = icmp eq i32 %28, %29
br i1 %30, label %31, label %34
31: ; preds = %27, %23, %20, %17
%32 = load i32, i32* %2
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %32)
br label %36
34: ; preds = %27
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
br label %37
37: ; preds = %36
%38 = load i32, i32* %6
%39 = add nsw i32 %38, -1
store i32 %39, i32* %6
br label %14
40: ; preds = %14
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %42
42: ; preds = %40
%43 = load i32, i32* %5
%44 = add nsw i32 %43, -1
store i32 %44, i32* %5
br label %9
45: ; preds = %9
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 sgt i32 %8, 0
br i1 %9, label %10, label %39
10: ; preds = %0, %35
%11 = phi i32 [ %37, %35 ], [ %8, %0 ]
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %35
14: ; preds = %10
%15 = icmp eq i32 %11, 1
br label %16
16: ; preds = %32, %14
%17 = phi i32 [ %12, %14 ], [ %34, %32 ]
%18 = phi i32 [ %12, %14 ], [ %33, %32 ]
%19 = icmp eq i32 %18, 1
%20 = select i1 %15, i1 true, i1 %19
%21 = load i32, i32* %3
%22 = icmp eq i32 %11, %21
%23 = select i1 %20, i1 true, i1 %22
%24 = icmp eq i32 %18, %17
%25 = select i1 %23, i1 true, i1 %24
br i1 %25, label %28, label %26
26: ; preds = %16
%27 = call i32 @putchar(i32 32)
br label %32
28: ; preds = %16
%29 = load i32, i32* %1
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = icmp ugt i32 %18, 1
br i1 %31, label %32, label %35
32: ; preds = %26, %28
%33 = add nsw i32 %18, -1
%34 = load i32, i32* %2
br label %16
35: ; preds = %28, %10
%36 = call i32 @putchar(i32 10)
%37 = add nsw i32 %11, -1
%38 = icmp sgt i32 %11, 1
br i1 %38, label %10, label %39
39: ; preds = %35, %0
ret i32 0
}