#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;
  int i, j, k;
  scanf("%d%d%d", &n, &w, &h);
  for (i = 1; i <= h; i++) {
    if ((i == 1) || (i == h)) {
      for (j = 1; j <= w; j++)
        printf("%d", n);
    } else {
      for (k = 1; k <= w; k++) {
        if ((k == 1) || (k == 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>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1228 <main+0x108>
cmpl   $0x1,-0x14(%rbp)
je     1170 <main+0x50>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11a7 <main+0x87>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11a2 <main+0x82>
mov    -0x8(%rbp),%esi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1177 <main+0x57>
jmp    120c <main+0xec>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1207 <main+0xe7>
cmpl   $0x1,-0x1c(%rbp)
je     11d0 <main+0xb0>
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11e6 <main+0xc6>
mov    -0x8(%rbp),%esi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f4 <main+0xd4>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f9 <main+0xd9>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ae <main+0x8e>
jmp    120c <main+0xec>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
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    0xc(%rsp),%rsi
lea    0x4(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x8(%rsp),%ecx
test   %ecx,%ecx
jle    120c <main+0xdc>
mov    $0x1,%r14d
lea    0xe98(%rip),%rbx
jmp    118e <main+0x5e>
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r14),%eax
mov    0x8(%rsp),%ecx
cmp    %ecx,%r14d
mov    %eax,%r14d
jge    120c <main+0xdc>
mov    0x4(%rsp),%eax
cmp    $0x1,%r14d
je     11e0 <main+0xb0>
cmp    %ecx,%r14d
je     11e0 <main+0xb0>
test   %eax,%eax
jle    1170 <main+0x40>
xor    %ebp,%ebp
jmp    11c6 <main+0x96>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
cmp    %eax,%ebp
jge    1170 <main+0x40>
mov    %ebp,%ecx
lea    0x1(%rcx),%ebp
test   %ecx,%ecx
je     11b0 <main+0x80>
cmp    %eax,%ebp
je     11b0 <main+0x80>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11be <main+0x8e>
nop
test   %eax,%eax
jle    1170 <main+0x40>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     11f0 <main+0xc0>
jmp    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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