#Lutece0089. Graph Game

Graph Game

Migrated from Lutece 89 Graph Game

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Alice and Bob are playing a graph game, this game goes like this: Two players start the game with a graph. They delete a edge from the graph in turn, every time the edge they deleted must be a valid edge, a edge called valid if the sum of the degree of the two nodes it connect is even. The player who can't find a valid edge to delete lose.

Now, They have a graph with NN nodes and MM edges, They want to play multiple times game, so each time they choose a subgraph and playing the graph game. A subgraph is define as follow: select some nodes(maybe all) in the original graph, and select edges which the two nodes it connect has being selected. The graph contain those selected nodes and edges called a subgraph.

Alice will make the first deleting, now, she want to know if both players always take the best moves and never make mistakes, how many subgraphs she will win, plaese help her.

Input

First line of the input is a single integer TT(1T201\leq T \leq 20), indicates there are TT test cases.

For each test case, the first line contain two integers NN(2N402 \leq N \leq 40) and MM(1M4001 \leq M \leq 400), indicating the number of nodes and edges in graph. Then MM lines followed, each line contains two numbers xx and yy(1x,yN1 \leq x,y \leq N), indicating there is one edge between node xx and node yy, data will contain no self-loop, and no more than one edge between any two nodes.

Output

For each case,output Case #t: ret in a single line, where tt indicates the case number between 11 and TT, and retret is the number of subgraphs which first player can win.

Samples

2
2 1
1 2
3 2
1 2
2 3
Case #1: 1
Case #2: 2

Resources

Sichuan State Programming Contest 2012