#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 main() {
  int t, i, a, b, c;
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    scanf("%d %d %d", &a, &b, &c);
    if (a <= 20 && b <= 20 && c <= 20)
      printf("Case %d: good\n", i);
    else
      printf("Case %d: bad\n", i);
  }
  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     11c2 <main+0xa2>
lea    0xea5(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x14,-0x10(%rbp)
jg     11a0 <main+0x80>
cmpl   $0x14,-0x14(%rbp)
jg     11a0 <main+0x80>
cmpl   $0x14,-0x18(%rbp)
jg     11a0 <main+0x80>
mov    -0xc(%rbp),%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
jmp    11af <main+0x8f>
mov    -0xc(%rbp),%esi
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
jmp    11b4 <main+0x94>
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    0xed1(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11ba <main+0x9a>
mov    $0x1,%ebx
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0xea6(%rip),%rbp
lea    0xeae(%rip),%r14
jmp    1194 <main+0x74>
nopl   0x0(%rax)
cmpl   $0x15,0x10(%rsp)
cmovge %r14,%rdi
cmpl   $0x15,0x14(%rsp)
cmovge %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%eax
cmp    0x8(%rsp),%ebx
mov    %eax,%ebx
jge    11ba <main+0x9a>
lea    0xe65(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x15,0xc(%rsp)
mov    %rbp,%rdi
jl     1170 <main+0x50>
mov    %r14,%rdi
jmp    1170 <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 = [15 x i8] c"Case %d: good\0A\00"
@.str.3 = [14 x i8] c"Case %d: 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 = %29, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %32
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* %5, i32* %6)
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 20
br i1 %15, label %16, label %25
16: ; preds = %12
%17 = load i32, i32* %5
%18 = icmp sle i32 %17, 20
br i1 %18, label %19, label %25
19: ; preds = %16
%20 = load i32, i32* %6
%21 = icmp sle i32 %20, 20
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %23)
br label %28
25: ; preds = %19, %16, %12
%26 = load i32, i32* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %22
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %8
32: ; 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 = [15 x i8] c"Case %d: good\0A\00"
@.str.3 = [14 x i8] c"Case %d: bad\0A\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 %28, label %12
12: ; preds = %0, %12
%13 = phi i32 [ %25, %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* %3, i32* %4)
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 21
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 21
%19 = select i1 %16, i1 %18, i1 false
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, 21
%22 = select i1 %19, i1 %21, i1 false
%23 = select i1 %22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0)
%24 = call i32 @printf(i8* %23, i32 %13)
%25 = add nuw nsw i32 %13, 1
%26 = load i32, i32* %1
%27 = icmp slt i32 %13, %26
br i1 %27, label %12, label %28
28: ; preds = %12, %0
ret i32 0
}