Lucky Tickets

Count digit strings of length 2N whose first N digits sum to the same value as the last N digits, modulo 1e9+7.

Medium5Dynamic programmingCombinatoricsMathPrefix sumInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

Every bus and train ticket issued in the Soviet Union had an identifier with an even number of digits, 2N. Many places in Russia and Kazakhstan still use identifiers of this form. A ticket is lucky when the sum of the first N digits of its identifier equals the sum of the last N digits.

An identifier is a string of 2N digits from 0 to 9, and identifiers whose first digit is 0 are included.

Many children believe that eating such a ticket brings them good luck.

Given N, count the lucky tickets.

Input

The first line contains the number of test cases T. (1T1001 \le T \le 100)

Each of the next T lines contains one integer N. A ticket identifier has 2N digits. (1N5001 \le N \le 500)

Output

For each test case, print one line that starts with Case #i: and then gives the number of lucky tickets whose identifier has 2N digits. Here i is the test case number, counted from 1. The counts grow large quickly, so print each of them modulo 1000000007 (109+710^9 + 7).