#include <stdio.h>

/* maximum for long long */
#define MAX_FIB  50

int fib[MAX_FIB];

void init_fib() {
  int i;
  fib[0] = 0;
  fib[1] = 1;
  for (i = 2; i <= MAX_FIB; i++) {
    fib[i] = fib[i-1] + fib[i-2];
    /*printf("%i: %d\n", i, fib[i]);*/
  }
}

int main() {
  int numberProblems, nrSystems, I = 1;

  scanf("%i\n", &numberProblems);
  init_fib();
  while (numberProblems-- > 0) {
    printf("Scenario %d:\n", I++);
    scanf("%i\n", &nrSystems);
    /*printf("%d\n", nrSystems);*/
    printf("%d\n\n", fib[nrSystems+2]);
  }
  return 0;
}

