There are N binary strings (consisting of 0s and 1s) in a table. A pair of strings is good if there exists at least one character in common in both strings.
Find the number of good pairs of strings.
Input format
Output format
Print T lines. For each test case:
Constraints
1≤T≤10000
1≤N≤100000
1≤Length of String≤5
The sum of length over all test cases does not exceed 500000.
First Test Case: String 2 and 3 have character 0 in common
Second test case: All strings have 1 in common so answer is number of pairs, which is 10