#P1002. 树(c)

树(c)

Tree

Problem description

Given an integer nn, find the number of possible forms of a rooted tree with nn nodes.

Input format

The first line is a non-negative integer tt, indicating that there are tt sets of data.

Subsequently, there are tt lines, with one integer nn on each line.

Output Format

There are tt lines, each containing an integer, and the number of possible configurations is sought.

Since the answer may be very large, we need to output the answer modulo 109+910^9+9.

1 
3 
9 
1 
323 
283888610 

Data Range

For all data:

t104t \le 10^4

n109n \le 10^9

Tips

The pink node is the root.

Example 1: