#include #define INF 1000000001LL #define LNF 1000000000000000001LL #define MOD 998244353LL #define MAX 1005 #define long long long #define all(x) x.begin(),x.end() using namespace std; map,long> mp; vector graph[10]; long dfs(int x,vector cur, int sum) { if(sum == 0) return 1; if(mp.count(cur)) return mp[cur]; mp[cur] = 0; auto &t = mp[cur]; for(int y : graph[x]) { if(cur[y] == 0) continue; cur[0] = y; cur[y]--; t= (t+dfs(y,cur,sum-1))%MOD; cur[y]++; } return t; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n,m,k; cin >> n >> m >> k; for(int i = 0; i> a >> b; graph[a].push_back(b); graph[b].push_back(a); } vector vis(n+1,k); vis[0] = 0; for(int i = 1; i<=n; i++) graph[0].push_back(i); cout << dfs(0,vis,k*n) << endl; return 0; }