The Fifth Dimension

No attempts yetTime limit1sMemory limit128 MB

Problem

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,,sks_0, s_1, \dots, s_k in which every consecutive pair si,si+1s_i, s_{i+1} is joined by a tunnel; the length of the route is the number of tunnels it uses, kk. A route and its reverse are considered two different routes.

Routes of length 1,2,31, 2, 3 and 44 have already been inspected. Now the routes of length exactly 55 — those passing through 66 distinct stars via 55 tunnels — must be counted. For each universe, determine how many such routes exist.

Input

The first line contains an integer dd (1d1001 \le d \le 100), the number of universes. The descriptions of the universes follow.

Each universe begins with a line containing two integers nn and mm (1n2001 \le n \le 200; 0mn(n1)/20 \le m \le n(n-1)/2), the number of stars and the number of tunnels. Each of the next mm lines contains two integers uu and vv (1u,vn1 \le u, v \le n, uvu \ne v), meaning that stars uu and vv 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.

Output

For each universe, print on its own line the number of distinct routes of length exactly 55.