SP2202 TAN1 - Tan and His Interesting Game

Description

N/A

Input Format

The first line of the test data is the number of test case t,then t test case follow. For each test case: The first line contains a single integer M,the number of nodes in the tree(M

Output Format

For each test case: The first and only line contains a single integer S, which means there are S triples(A,B,C) that (A,B),(B,C),(A,C) are all good games or all bad games.