SP33126 ADALEMON - Ada and Lemon 1

Description

As you might already know, Ada the Ladybug is a farmer. She grows a lemon [tree](https://en.wikipedia.org/wiki/Tree_(data_structure)). She wants to pick exactly one lemon (which grows on every leaf of the tree). She is wondering how many distinct trees will remain after harvesting exactly one lemon. Tree is different if they are distinct for each permutation of node labels. Note that a single node is counted as leaf too.

Input Format

The first line of input will contain **1 , the number of test-cases.** Each of the testcases will contain single integer **N**, the size of tree. The next **N-1** lines will contain two integers **0 , the edges of tree.** The sum of **N** over all test-cases will not exceed **3000**.

Output Format

For each test-case output the number of distinct trees after harvesting exactly one lemon.