#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, width, height;
  scanf("%d %d %d", &N, &width, &height);
  int i, j;
  for (i = 1; i <= height; i++) {
    for (j = 1; j <= width; j++) {
      if (j == width || j == 1 || i == 1 || i == height)
        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     11ec <main+0xcc>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11d0 <main+0xb0>
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1199 <main+0x79>
cmpl   $0x1,-0x18(%rbp)
je     1199 <main+0x79>
cmpl   $0x1,-0x14(%rbp)
je     1199 <main+0x79>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11af <main+0x8f>
mov    -0x8(%rbp),%esi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bd <main+0x9d>
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c2 <main+0xa2>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1161 <main+0x41>
lea    0xe34(%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    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    11e4 <main+0xb4>
mov    $0x1,%ebx
lea    0xe9b(%rip),%r14
jmp    1187 <main+0x57>
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%ecx
mov    0x4(%rsp),%eax
cmp    %eax,%ebx
mov    %ecx,%ebx
jge    11e4 <main+0xb4>
mov    0x8(%rsp),%ecx
test   %ecx,%ecx
jle    1170 <main+0x40>
mov    $0x1,%ebp
cmp    $0x1,%ebp
je     11c0 <main+0x90>
nopl   0x0(%rax)
cmp    %ecx,%ebp
je     11c0 <main+0x90>
cmp    $0x1,%ebx
je     11c0 <main+0x90>
cmp    %eax,%ebx
je     11c0 <main+0x90>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11ce <main+0x9e>
nopl   0x0(%rax)
mov    0xc(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%ecx
cmp    %ecx,%ebp
jge    1170 <main+0x40>
add    $0x1,%ebp
mov    0x4(%rsp),%eax
cmp    $0x1,%ebp
jne    11a0 <main+0x70>
jmp    11c0 <main+0x90>
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)
store i32 1, i32* %5
br label %8
8: ; preds = %42, %0
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %45
12: ; preds = %8
store i32 1, i32* %6
br label %13
13: ; preds = %37, %12
%14 = load i32, i32* %6
%15 = load i32, i32* %3
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %40
17: ; preds = %13
%18 = load i32, i32* %6
%19 = load i32, i32* %3
%20 = icmp eq i32 %18, %19
br i1 %20, label %31, label %21
21: ; preds = %17
%22 = load i32, i32* %6
%23 = icmp eq i32 %22, 1
br i1 %23, label %31, label %24
24: ; preds = %21
%25 = load i32, i32* %5
%26 = icmp eq i32 %25, 1
br i1 %26, label %31, label %27
27: ; preds = %24
%28 = load i32, i32* %5
%29 = load i32, i32* %4
%30 = icmp eq i32 %28, %29
br i1 %30, label %31, label %34
31: ; preds = %27, %24, %21, %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 %13
40: ; preds = %13
%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 %8
45: ; 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 %43, label %10
10: ; preds = %0, %38
%11 = phi i32 [ %41, %38 ], [ %8, %0 ]
%12 = phi i32 [ %40, %38 ], [ 1, %0 ]
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 1
br i1 %14, label %38, label %15
15: ; preds = %10
%16 = icmp eq i32 %12, 1
br label %17
17: ; preds = %35, %15
%18 = phi i32 [ %11, %15 ], [ %37, %35 ]
%19 = phi i32 [ %13, %15 ], [ %33, %35 ]
%20 = phi i32 [ 1, %15 ], [ %36, %35 ]
%21 = icmp eq i32 %20, %19
%22 = icmp eq i32 %20, 1
%23 = or i1 %22, %21
%24 = select i1 %23, i1 true, i1 %16
%25 = icmp eq i32 %12, %18
%26 = select i1 %24, i1 true, i1 %25
br i1 %26, label %27, label %30
27: ; preds = %17
%28 = load i32, i32* %1
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %28)
br label %32
30: ; preds = %17
%31 = call i32 @putchar(i32 32)
br label %32
32: ; preds = %27, %30
%33 = load i32, i32* %2
%34 = icmp slt i32 %20, %33
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = add nuw nsw i32 %20, 1
%37 = load i32, i32* %3
br label %17
38: ; preds = %32, %10
%39 = call i32 @putchar(i32 10)
%40 = add nuw nsw i32 %12, 1
%41 = load i32, i32* %3
%42 = icmp slt i32 %12, %41
br i1 %42, label %10, label %43
43: ; preds = %38, %0
ret i32 0
}