#include using namespace std; long long determinant(std::vector> A){ const long long mod = 998244353; std::function GFinv = [&](long long b){ long long e = mod-2; long long r=1; while(e){ if(e&1){ r=(r*b)%mod; } b=(b*b)%mod; e >>=1; } return r; }; int N=A.size(); long long det = 1; for(int i=0;i> N >> K; vector>> E(K); for(int k=0;k> t; E[k].resize(t); for(int i=0;i> a >> b; a--;b--; if(a>b)swap(a,b); E[k][i] = {a,b}; } } long long Ans = 0; for(long long j=0;j<(1<> L(N-1,vector(N-1,0)); for(int k=0;k>k)%2==0)continue; num++; for(pair p:E[k]){ long long a = p.first, b = p.second; if(a!=N-1)L[a][a]++; if(b!=N-1)L[b][b]++; if(a!=N-1 && b!=N-1)L[a][b]--; if(a!=N-1 && b!=N-1)L[b][a]--; } for(int i=0;i