#d11007. 平衡二叉树

平衡二叉树

Balanced Binary Tree

Problem Description

A balanced binary tree (AVL tree) is a binary tree in which the height difference between the left and right subtrees is at most 11, and both the left and right subtrees are themselves AVL trees. Given the number of nodes nn, count how many distinct AVL tree shapes have exactly nn nodes.

Input Format

One line containing an integer TT (T≤2000T \le 2000), the number of test cases.

The next TT lines each contain an integer nn (n≤2000n \le 2000).

Output Format

For each test case, output one number — the result. Since the result may be huge, output it modulo 109+710^9 + 7.

Sample Input

1
10

Sample Output

60