#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;
  scanf("%d%d%d", &N, &w, &h);
  int i, j;
  i = 1;
  for (i = 1; i <= h; i++) {
    if (i == 1 || i == h) {
      for (j = 1; j <= w; j++)
        printf("%d", N);
    } else {
      printf("%d", N);
      for (j = 2; j < w; j++)
        printf(" ");
      printf("%d", N);
    }
    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)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     121b <main+0xfb>
cmpl   $0x1,-0x14(%rbp)
je     1177 <main+0x57>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11ae <main+0x8e>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11a9 <main+0x89>
mov    -0x8(%rbp),%esi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    117e <main+0x5e>
jmp    11ff <main+0xdf>
mov    -0x8(%rbp),%esi
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ee <main+0xce>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11c6 <main+0xa6>
mov    -0x8(%rbp),%esi
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1155 <main+0x35>
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    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    120c <main+0xdc>
mov    $0x1,%ebx
lea    0xe99(%rip),%r14
jmp    1195 <main+0x65>
nopl   (%rax)
mov    0x8(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%ecx
mov    0xc(%rsp),%eax
cmp    %eax,%ebx
mov    %ecx,%ebx
jge    120c <main+0xdc>
cmp    $0x1,%ebx
je     11e0 <main+0xb0>
cmp    %eax,%ebx
je     11e0 <main+0xb0>
mov    0x8(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x3,0x4(%rsp)
jl     1170 <main+0x40>
mov    $0x2,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     11c0 <main+0x90>
jmp    1170 <main+0x40>
cs nopw 0x0(%rax,%rax,1)
nop
cmpl   $0x0,0x4(%rsp)
jle    117e <main+0x4e>
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    0x8(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     11f0 <main+0xc0>
jmp    117e <main+0x4e>
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
store i32 0, i32* %1
%7 = 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
store i32 1, i32* %5
br label %8
8: ; preds = %48, %0
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %51
12: ; preds = %8
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 1
br i1 %14, label %19, label %15
15: ; preds = %12
%16 = load i32, i32* %5
%17 = load i32, i32* %4
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %31
19: ; preds = %15, %12
store i32 1, i32* %6
br label %20
20: ; preds = %27, %19
%21 = load i32, i32* %6
%22 = load i32, i32* %3
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %20
30: ; preds = %20
br label %46
31: ; preds = %15
%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)
store i32 2, i32* %6
br label %34
34: ; preds = %40, %31
%35 = load i32, i32* %6
%36 = load i32, i32* %3
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38
%41 = load i32, i32* %6
%42 = add nsw i32 %41, 1
store i32 %42, i32* %6
br label %34
43: ; preds = %34
%44 = load i32, i32* %2
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %30
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %46
%49 = load i32, i32* %5
%50 = add nsw i32 %49, 1
store i32 %50, i32* %5
br label %8
51: ; preds = %8
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 %45, label %10
10: ; preds = %0, %40
%11 = phi i32 [ %43, %40 ], [ %8, %0 ]
%12 = phi i32 [ %42, %40 ], [ 1, %0 ]
%13 = icmp eq i32 %12, 1
%14 = icmp eq i32 %12, %11
%15 = select i1 %13, i1 true, i1 %14
br i1 %15, label %16, label %26
16: ; preds = %10
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 1
br i1 %18, label %40, label %19
19: ; preds = %16, %19
%20 = phi i32 [ %23, %19 ], [ 1, %16 ]
%21 = load i32, i32* %1
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = add nuw nsw i32 %20, 1
%24 = load i32, i32* %2
%25 = icmp slt i32 %20, %24
br i1 %25, label %19, label %40
26: ; preds = %10
%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)
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, 2
br i1 %30, label %31, label %37
31: ; preds = %26, %31
%32 = phi i32 [ %34, %31 ], [ 2, %26 ]
%33 = call i32 @putchar(i32 32)
%34 = add nuw nsw i32 %32, 1
%35 = load i32, i32* %2
%36 = icmp slt i32 %34, %35
br i1 %36, label %31, label %37
37: ; preds = %31, %26
%38 = load i32, i32* %1
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %19, %16, %37
%41 = call i32 @putchar(i32 10)
%42 = add nuw nsw i32 %12, 1
%43 = load i32, i32* %3
%44 = icmp slt i32 %12, %43
br i1 %44, label %10, label %45
45: ; preds = %40, %0
ret i32 0
}