#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);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int total, cols, rows;
  scanf("%d %d %d", &total, &rows, &cols);
  if (rows < cols) {
    rows = cols;
  }
  for (int row = rows + 1; row <= total; row++) {
    for (int col = cols + 1; col < row; col++) {
      printf("%d ", col);
    }
    printf("%d\n", row);
  }
  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    -0x10(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <main+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11bd <main+0x9d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11a0 <main+0x80>
mov    -0x18(%rbp),%esi
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1177 <main+0x57>
mov    -0x14(%rbp),%esi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1162 <main+0x42>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x4(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebp
mov    0x8(%rsp),%ebx
cmp    %ebx,%ebp
jge    1159 <main+0x39>
mov    %ebx,0x4(%rsp)
mov    %ebx,%ebp
cmp    0xc(%rsp),%ebp
jge    11ac <main+0x8c>
lea    0xea3(%rip),%r14
lea    0xea0(%rip),%r15
nopl   (%rax)
lea    0x1(%rbp),%r12d
cmp    %ebp,%ebx
jge    1191 <main+0x71>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    %ebp,%ebx
jl     1180 <main+0x60>
mov    %r15,%rdi
mov    %r12d,%esi
call   1030 <printf@plt>
cmp    0xc(%rsp),%r12d
jge    11ac <main+0x8c>
mov    0x8(%rsp),%ebx
mov    %r12d,%ebp
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [4 x i8] c"%d\0A\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* %3, i32* %2)
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 %9, i32* %3
br label %12
12: ; preds = %11, %0
%13 = phi i32 [ %9, %11 ], [ %8, %0 ]
%14 = load i32, i32* %1
%15 = icmp slt i32 %13, %14
br i1 %15, label %17, label %16
16: ; preds = %22, %12
ret i32 0
17: ; preds = %12, %26
%18 = phi i32 [ %27, %26 ], [ %9, %12 ]
%19 = phi i32 [ %20, %26 ], [ %13, %12 ]
%20 = add nsw i32 %19, 1
%21 = icmp slt i32 %18, %19
br i1 %21, label %28, label %22
22: ; preds = %28, %17
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %20)
%24 = load i32, i32* %1
%25 = icmp slt i32 %20, %24
br i1 %25, label %26, label %16
26: ; preds = %22
%27 = load i32, i32* %2
br label %17
28: ; preds = %17, %28
%29 = phi i32 [ %30, %28 ], [ %18, %17 ]
%30 = add nsw i32 %29, 1
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = icmp slt i32 %30, %19
br i1 %32, label %28, label %22
}