* Line 1: Two space-separated integers N and M
* Lines 2..1+M: Line i+1 describes the ith trail. Each line contains
two space-separated integers u_i and v_i (1 <= u_i, v_i <= N,
u_i != v_i) describing the pair of farms connected by the
trail.
* Line 1: A single line containing the number of assignments of trails
to farms, taken modulo 1,000,000,007. If no assignment
satisfies the above conditions output 0.
Note that there can be two trails between the same pair of farms.