#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t, n, a, ans = 0, i = 0;
  scanf("%d", &t);
  while (t--) {
    i++;
    scanf("%d", &n);
    while (n--) {
      scanf("%d", &a);
      if (a > ans)
        ans = a;
    }
    printf("Case %d: %d\n", i, ans);
    ans = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     11d3 <main+0xb3>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    0xe8f(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     11b5 <main+0x95>
lea    0xe6b(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    11b0 <main+0x90>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    117a <main+0x5a>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
jmp    114d <main+0x2d>
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    0xecb(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
subl   $0x1,0x10(%rsp)
jae    1157 <main+0x37>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r12d,%r12d
lea    0xe9f(%rip),%rbx
lea    0xc(%rsp),%r14
lea    0xe96(%rip),%r15
lea    0x14(%rsp),%r13
jmp    1194 <main+0x74>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
subl   $0x1,0x10(%rsp)
jb     1146 <main+0x26>
add    $0x1,%r12d
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
subl   $0x1,0xc(%rsp)
mov    $0x0,%ebp
jb     1180 <main+0x60>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    %ebp,%eax
cmovg  %eax,%ebp
subl   $0x1,0xc(%rsp)
jae    11c0 <main+0xa0>
jmp    1180 <main+0x60>

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

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