Sums of Distinct Natural Numbers

No attempts yetTime limit7sMemory limit128 MB

Problem

Count how many ways a positive integer NN (1N20001 \le N \le 2000) can be written as a sum of distinct natural numbers.

One way obeys all of the following.

  • Every natural number in the sum is different. No number may appear twice.
  • Two sums that differ only in the order of the terms count as one way.
  • The single-term sum NN itself counts as one way.

Given NN, write a program that counts the ways.

Input

The first line has the number of test cases TT (1T201 \le T \le 20). Each of the next TT lines has one NN.

Output

For each test case, print the number of ways to write NN as a sum of distinct natural numbers modulo 100999100999, one per line, in input order.