Your Rank is Pure (Small)

Count subsets of 2 to n containing n whose repeated rank mapping stays inside the set until it reaches 1, modulo 100003.

Medium7Dynamic programmingCombinatoricsNo attempts yetTime limit5sMemory limit512 MB

Problem

Pontius: You know, I like this number 127, I don't know why.
Woland: Well, that is an object so pure. You know the prime numbers.
Pontius: Surely I do. Those are the objects our ancient masters possessed hundreds of years ago. Oh, yes, why then? 127 is indeed a prime number as I was told.
Woland: Not... only... that. 127 is the 31st prime number; then, 31 is itself a prime, it is the 11th; and 11 is the 5th; 5 is the 3rd; 3, you know, is the second; and finally 2 is the 1st.
Pontius: Heh, that is indeed... purely prime.

The game runs on a set SS of positive integers. For an element xx of SS, sort the elements of SS in increasing order and count positions from 1. The position of xx in that order is the rank of xx, written rankS(x)\mathrm{rank}_S(x).

An element xx of SS is pure with respect to SS when the sequence that starts at xx and repeatedly replaces the current value by its rank in SS reaches 1 after finitely many steps, and every value it visits before reaching 1 belongs to SS. The number 1 never belongs to SS.

You are given nn. Count the subsets SS of {2,3,,n}\{2, 3, \dots, n\} for which nn is pure with respect to SS. The count can be large, so print it modulo 100003100003.

Input

The first line contains the number of test cases TT. Each of the next TT lines contains one integer nn.

Limits

  • T100T \le 100
  • 2n252 \le n \le 25

Output

For each test case, print one line of the form Case #x: y, where x is the test case number starting from 1 and y is the count described above.