Under construction

Still being built. Things may change

Determinant

Time limit5sMemory limit512 MB

Summary
Find the determinant mod 998244353 of the adjacency matrix of a connected graph where every (k+1)-vertex set has a pair separated by one edge.
Level

Hard9 of 10

Topics
Graph, Dynamic programming, Matrix
Solved
No attempts yet

Statement

Um_nik has a simple connected undirected graph with the following property:

For any subset AA of k+1k+1 vertices of the graph, there exist two vertices a,b∈Aa, b \in A and some edge ee, such that all paths from aa to bb contain edge ee.

Please help him find the determinant of the adjacency matrix of his graph modulo 998 244 353.

Input

The first line contains three integers nn, mm, kk: the number of vertices and edges in the graph and the given parameter (1≤n≤25 0001 \le n \le 25\,000, n−1≤m≤500 000n - 1 \le m \le 500\,000, 1≤k≤251 \le k \le 25).

The next mm lines describe the edges of the graph. Each line contains two integers uu and vv, the two vertices connected by an edge (1≤u,v≤n1 \le u, v \le n, u≠vu \ne v).

It is guaranteed that the graph is connected and that for any subset AA of k+1k+1 vertices, there exist two vertices a,b∈Aa, b \in A and an edge ee such that all paths from aa to bb contain edge ee. It is also guaranteed that the graph has no multiple edges.

Output

Print a single integer: the determinant of the adjacency matrix of Um_nik's graph modulo 998 244 353.

Hint

Examples3

  1. Example 1

    Input
    4 3 1
    1 2
    2 3
    3 4
    
    Expected output
    1
    
  2. Example 2

    Input
    6 6 3
    2 3
    5 6
    2 5
    1 2
    3 4
    6 2
    
    Expected output
    998244352
    
  3. Example 3

    Input
    10 15 10
    1 8
    1 7
    6 7
    2 8
    6 9
    1 2
    4 9
    4 10
    4 6
    5 6
    3 8
    9 10
    8 10
    3 5
    2 7
    
    Expected output
    35