Given an integer k, Bobo chooses a subset of edges such that the vertices 1, 2, ..., k can reach each other via the chosen edges. He wants the chosen number of edges is minimized. Find out the number of ways to choose modulo (109+7).
The input consists of several test cases and is terminated by end-of-file.
The first line of each test case contains three integers n, m and k.
The i-th of the following m lines contains 2 integers ai and bi which denote the edge between vertices ai and bi.
For each test case, print an integer which denotes the result.
4 4 2 1 3 1 4 2 3 2 4 4 3 3 1 4 2 4 3 4 3 2 2 1 3 2 3
2 1 1
* 1 ≤ n ≤ 50
*
*
* 1 ≤ ai, bi ≤ n
* The number of test cases does not exceed 100.
* The number of test cases with n > 8 does not exceed 5.

这道题你会答吗?花几分钟告诉大家答案吧!