#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 main() {
  int n, w, h, x, y;
  scanf("%d", &n);
  scanf("%d", &w);
  scanf("%d", &h);
  for (x = 1; x <= h; x++) {
    for (y = 1; y <= w; y++) {
      if (y == 1 || y == w || x == 1 || x == h) {
        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
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1204 <main+0xe4>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11e8 <main+0xc8>
cmpl   $0x1,-0x18(%rbp)
je     11b1 <main+0x91>
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11b1 <main+0x91>
cmpl   $0x1,-0x14(%rbp)
je     11b1 <main+0x91>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11c7 <main+0xa7>
mov    -0x8(%rbp),%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d5 <main+0xb5>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11da <main+0xba>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1179 <main+0x59>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1166 <main+0x46>
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),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11f4 <main+0xc4>
mov    $0x1,%ebx
lea    0xe83(%rip),%r14
jmp    1195 <main+0x65>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
cmp    0x4(%rsp),%ebx
mov    %eax,%ebx
jge    11f4 <main+0xc4>
cmpl   $0x0,0x8(%rsp)
jle    1180 <main+0x50>
mov    0xc(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%eax
cmp    $0x2,%eax
jl     1180 <main+0x50>
mov    $0x1,%ebp
jmp    11d6 <main+0xa6>
nopw   0x0(%rax,%rax,1)
mov    0xc(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%eax
cmp    %eax,%ebp
jge    1180 <main+0x50>
add    $0x1,%ebp
cmp    %eax,%ebp
je     11c0 <main+0x90>
cmp    $0x1,%ebx
je     11c0 <main+0x90>
cmp    0x4(%rsp),%ebx
je     11c0 <main+0x90>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11ce <main+0x9e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 1
br i1 %11, label %44, label %12
12: ; preds = %0, %39
%13 = phi i32 [ %41, %39 ], [ 1, %0 ]
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 1
br i1 %15, label %39, label %16
16: ; preds = %12
%17 = icmp eq i32 %13, 1
%18 = load i32, i32* %1
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %2
%21 = icmp sgt i32 %20, 1
br i1 %21, label %22, label %39
22: ; preds = %16, %35
%23 = phi i32 [ %37, %35 ], [ %20, %16 ]
%24 = phi i32 [ %36, %35 ], [ 2, %16 ]
%25 = icmp eq i32 %24, %23
%26 = select i1 %25, i1 true, i1 %17
%27 = load i32, i32* %3
%28 = icmp eq i32 %13, %27
%29 = select i1 %26, i1 true, i1 %28
br i1 %29, label %30, label %33
30: ; preds = %22
%31 = load i32, i32* %1
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %31)
br label %35
33: ; preds = %22
%34 = call i32 @putchar(i32 32)
br label %35
35: ; preds = %30, %33
%36 = add nuw nsw i32 %24, 1
%37 = load i32, i32* %2
%38 = icmp slt i32 %24, %37
br i1 %38, label %22, label %39
39: ; preds = %35, %16, %12
%40 = call i32 @putchar(i32 10)
%41 = add nuw nsw i32 %13, 1
%42 = load i32, i32* %3
%43 = icmp slt i32 %13, %42
br i1 %43, label %12, label %44
44: ; preds = %39, %0
ret i32 0
}