#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(void) {
  int T, caseId, length, height, width;
  scanf("%d", &T);
  caseId = 1;
  while (caseId <= T) {
    scanf("%d %d %d", &length, &width, &height);
    printf("Case %d: ", caseId);
    if (length <= 20 && width <= 20 && height <= 20)
      printf("good\n");
    else
      printf("bad\n");
    caseId++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11cc <main+0xac>
lea    0xea5(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x14(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%esi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x14,-0x10(%rbp)
jg     11b0 <main+0x90>
cmpl   $0x14,-0x18(%rbp)
jg     11b0 <main+0x90>
cmpl   $0x14,-0x14(%rbp)
jg     11b0 <main+0x90>
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <main+0x9e>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <main+0x28>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xec1(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11d1 <main+0xa1>
lea    0xc(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0xea0(%rip),%rbx
lea    0xea7(%rip),%r14
lea    0xe9c(%rip),%r15
xor    %ebp,%ebp
nopl   0x0(%rax)
add    $0x1,%ebp
lea    0xe76(%rip),%rdi
lea    0x14(%rsp),%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x15,0x10(%rsp)
mov    %r15,%rdi
cmovl  %r14,%rdi
cmpl   $0x15,0xc(%rsp)
cmovge %r15,%rdi
cmpl   $0x15,0x14(%rsp)
cmovge %r15,%rdi
call   1030 <puts@plt>
cmp    0x8(%rsp),%ebp
jl     1180 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [10 x i8] c"Case %d: \00"
@str = [4 x i8] c"bad\00"
@str.5 = [5 x i8] c"good\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 1
br i1 %11, label %29, label %12
12: ; preds = %0, %12
%13 = phi i32 [ %26, %12 ], [ 1, %0 ]
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %4, i32* %3)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 21
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 21
%20 = select i1 %17, i1 %19, i1 false
%21 = load i32, i32* %3
%22 = icmp slt i32 %21, 21
%23 = select i1 %20, i1 %22, i1 false
%24 = select i1 %23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0)
%25 = call i32 @puts(i8* dereferenceable(1) %24)
%26 = add nuw nsw i32 %13, 1
%27 = load i32, i32* %1
%28 = icmp slt i32 %13, %27
br i1 %28, label %12, label %29
29: ; preds = %12, %0
ret i32 0
}