#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, unsigned long long);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  unsigned long long int numWay[51];
  int i, T, n, caseId;
  numWay[0] = 0;
  numWay[1] = 2;
  numWay[2] = 3;
  for (i = 3; i < 51; i++)
    numWay[i] = numWay[i - 1] + numWay[i - 2];
  scanf("%d", &T);
  caseId = 1;
  while (caseId <= T) {
    scanf("%d", &n);
    printf("Scenario #%d:\n%llu\n\n", caseId, numWay[n]);
    caseId++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x1a0(%rbp)
movq   $0x2,-0x198(%rbp)
movq   $0x3,-0x190(%rbp)
movl   $0x3,-0x1a4(%rbp)
cmpl   $0x33,-0x1a4(%rbp)
jge    11b3 <main+0x93>
mov    -0x1a4(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1a0(%rbp,%rax,8),%rcx
ff
mov    -0x1a4(%rbp),%eax
sub    $0x2,%eax
cltq
add    -0x1a0(%rbp,%rax,8),%rcx
ff
movslq -0x1a4(%rbp),%rax
mov    %rcx,-0x1a0(%rbp,%rax,8)
ff
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    115d <main+0x3d>
lea    0xe46(%rip),%rdi
lea    -0x1a8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x1b0(%rbp)
mov    -0x1b0(%rbp),%eax
cmp    -0x1a8(%rbp),%eax
jg     122a <main+0x10a>
lea    0xe17(%rip),%rdi
lea    -0x1ac(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x1b0(%rbp),%esi
movslq -0x1ac(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rdx
ff
lea    0xdf2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    11d0 <main+0xb0>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1a8,%rsp
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    $0x5,%edx
mov    $0x7,%eax
add    -0x18(%rsp,%rax,8),%rdx
mov    %rdx,-0x8(%rsp,%rax,8)
mov    -0x10(%rsp,%rax,8),%rcx
add    %rdx,%rcx
mov    %rcx,(%rsp,%rax,8)
add    %rdx,%rcx
mov    %rcx,0x8(%rsp,%rax,8)
cmp    $0x33,%rax
je     1186 <main+0x66>
add    (%rsp,%rax,8),%rcx
mov    %rcx,0x10(%rsp,%rax,8)
add    $0x4,%rax
mov    %rcx,%rdx
jmp    1150 <main+0x30>
lea    0xe93(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11e8 <main+0xc8>
xor    %ebx,%ebx
lea    0xe79(%rip),%r14
lea    0xc(%rsp),%r15
lea    0xe70(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
mov    0x10(%rsp,%rax,8),%rdx
mov    %r12,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    0x8(%rsp),%ebx
jl     11c0 <main+0xa0>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [21 x i8] c"Scenario #%d:\0A%llu\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [51 x i64]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = getelementptr inbounds [51 x i64], [51 x i64]* %2, i64 0, i64 0
store i64 0, i64* %7
%8 = getelementptr inbounds [51 x i64], [51 x i64]* %2, i64 0, i64 1
store i64 2, i64* %8
%9 = getelementptr inbounds [51 x i64], [51 x i64]* %2, i64 0, i64 2
store i64 3, i64* %9
store i32 3, i32* %3
br label %10
10: ; preds = %28, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 51
br i1 %12, label %13, label %31
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [51 x i64], [51 x i64]* %2, i64 0, i64 %16
%18 = load i64, i64* %17
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [51 x i64], [51 x i64]* %2, i64 0, i64 %21
%23 = load i64, i64* %22
%24 = add i64 %18, %23
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [51 x i64], [51 x i64]* %2, i64 0, i64 %26
store i64 %24, i64* %27
br label %28
28: ; preds = %13
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %10
31: ; preds = %10
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 1, i32* %6
br label %33
33: ; preds = %37, %31
%34 = load i32, i32* %6
%35 = load i32, i32* %4
%36 = icmp sle i32 %34, %35
br i1 %36, label %37, label %47
37: ; preds = %33
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%39 = load i32, i32* %6
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [51 x i64], [51 x i64]* %2, i64 0, i64 %41
%43 = load i64, i64* %42
%44 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %39, i64 %43)
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %33
47: ; preds = %33
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [21 x i8] c"Scenario #%d:\0A%llu\0A\0A\00"
define i32 @main() {
%1 = alloca [51 x i64]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [51 x i64]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast [51 x i64]* %1 to <2 x i64>*
store <2 x i64> <i64 0, i64 2>, <2 x i64>* %7
%8 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 2
%9 = bitcast i64* %8 to <2 x i64>*
store <2 x i64> <i64 3, i64 5>, <2 x i64>* %9
br label %10
10: ; preds = %32, %0
%11 = phi i64 [ 4, %0 ], [ %37, %32 ]
%12 = phi i64 [ 5, %0 ], [ %35, %32 ]
%13 = phi i64 [ 3, %0 ], [ %30, %32 ]
%14 = add nsw i64 %13, -1
%15 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %14
%16 = load i64, i64* %15
%17 = add i64 %16, %12
%18 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %11
store i64 %17, i64* %18
%19 = or i64 %11, 1
%20 = add nsw i64 %11, -1
%21 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %20
%22 = load i64, i64* %21
%23 = add i64 %22, %17
%24 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %19
store i64 %23, i64* %24
%25 = or i64 %11, 2
%26 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %11
%27 = load i64, i64* %26
%28 = add i64 %27, %23
%29 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %25
store i64 %28, i64* %29
%30 = or i64 %11, 3
%31 = icmp eq i64 %30, 51
br i1 %31, label %38, label %32
32: ; preds = %10
%33 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %19
%34 = load i64, i64* %33
%35 = add i64 %34, %28
%36 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %30
store i64 %35, i64* %36
%37 = add nuw nsw i64 %11, 4
br label %10
38: ; preds = %10
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%40 = load i32, i32* %2
%41 = icmp slt i32 %40, 1
br i1 %41, label %53, label %42
42: ; preds = %38, %42
%43 = phi i32 [ %50, %42 ], [ 1, %38 ]
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%45 = load i32, i32* %3
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [51 x i64], [51 x i64]* %1, i64 0, i64 %46
%48 = load i64, i64* %47
%49 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %43, i64 %48)
%50 = add nuw nsw i32 %43, 1
%51 = load i32, i32* %2
%52 = icmp slt i32 %43, %51
br i1 %52, label %42, label %53
53: ; preds = %42, %38
ret i32 0
}