After having visited so many cities, tourist decided he will become a tour guide. He knows cities with undirected roads between them.
He plans to organize a circuit which starts in some city of his choice and for every subsequent city, the city has to be reachable from the current city using some of the roads. His circuit may contain the same city more than once, even in a row. For example for the city below
He may choose the circuit (to get from to he traverses two direct roads, stays twice at and traverses two direct roads again to get to ) or . The circuit is not a good one because there is no path between cities and .
He wonders for circuits of different lengths how many distinct such circuits exist that he can choose from. Precisely for lengths from to you must answer for each the number of possible circuits. Since the answer may be too large you are required to compute it modulo .
Input
The first line will contain three numbers, , and (), (), (). The following lines contain the description of the graph.
For tests worth points it is guaranteed that and .
Output
The output will contain on the first line integers, the number of circuits of length .
Example
stdin
6 5 2
1 2
1 3
2 3
3 4
5 6
stdout
6 20