Beyond the mirror lies a civilization far more advanced than ours. Long ago its scientists discovered interstellar tunnels: hidden passages, coiled inside a fifth dimension, that directly connect certain pairs of stars. Each tunnel is two-way, no tunnel joins a star to itself, and at most one tunnel joins any given pair of stars.
For safety, the government inspects every interstellar route. A route is a sequence of distinct stars s0,s1,…,sk in which every consecutive pair si,si+1 is joined by a tunnel; the length of the route is the number of tunnels it uses, k. A route and its reverse are considered two different routes.
Routes of length 1,2,3 and 4 have already been inspected. Now the routes of length exactly 5 — those passing through 6 distinct stars via 5 tunnels — must be counted. For each universe, determine how many such routes exist.
The first line contains an integer d (1≤d≤100), the number of universes. The descriptions of the universes follow.
Each universe begins with a line containing two integers n and m (1≤n≤200; 0≤m≤n(n−1)/2), the number of stars and the number of tunnels. Each of the next m lines contains two integers u and v (1≤u,v≤n, u=v), meaning that stars u and v are joined by a tunnel. No tunnel joins a star to itself, and at most one tunnel joins any pair of stars. Tunnels are two-way.
For each universe, print on its own line the number of distinct routes of length exactly 5.