The government of the Land Beyond the Looking-Glass has announced that it will build a large network of high-speed roads. In the plan, every road is two-way and is identified by a unique number. Each road connects two different roundabouts, and any two roundabouts are joined by at most one road. The roads never cross one another — tunnels and bridges are built wherever needed.
An illegal racing club was delighted by the announcement. To hold a race the club needs exactly four connected roads that together form a racing track. A racing track must pass through exactly five different roundabouts (in particular, the starting roundabout must differ from the finishing one): it is a chain of roundabouts r1−r2−r3−r4−r5 in which all five roundabouts are distinct and every consecutive pair is joined by a road.
Two races are considered different when their racing tracks differ. Two racing tracks are the same when they consist of exactly the same set of four roads, and different when they differ in at least one road (so travelling the same track in the opposite direction gives the same track).
Given the planned road network, count how many different racing tracks the club could hold.
The first line contains an integer d (1≤d≤100) — the number of test cases.
For each test case, the first line contains two integers n and m (1≤n≤200; 0≤m≤n(n−1)/2), where n is the number of roundabouts and m is the number of roads. Each of the next m lines contains two integers u and v (1≤u,v≤n), meaning that roundabout u is connected to roundabout v by a road.
For each test case, print on its own line the number of different racing tracks that can be built on the given road network.