#include #include using namespace std; using namespace atcoder; #define rep(i, n) for(int i=0;i<(n);++i) #define rep1(i, n) for(int i=1;i<=(n);i++) #define ll long long using mint = modint998244353; using P = pair; using lb = long double; using T = tuple, ll>; #ifdef LOCAL # include # define dbg(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else # define dbg(...) (static_cast(0)) #endif int main() { int n, m, k; cin >> n >> m >> k; map, int>, mint> mp; vector> g(n); rep(i,m){ int u, v; cin >> u >> v; --u;--v; g[u].push_back(v); g[v].push_back(u); } priority_queue, greater> pq; rep(i,n){ vector now(n); now[i] = 1; mp[make_pair(now, i)] = 1; pq.emplace(1, now, i); } set, int>> st; while(!pq.empty()) { auto [cnt, now, id] = pq.top();pq.pop(); if(st.count(make_pair(now,id))) continue; st.emplace(now, id); mint val = mp[make_pair(now, id)]; for(int v : g[id]) { if(now[v]+1>k) continue; else{ now[v]++; mp[make_pair(now, v)] += val; pq.emplace(cnt+1, now, v); now[v]--; } } } vector f; rep(i,n) f.push_back(k); mint ans = 0; rep(i,n) ans+=mp[make_pair(f, i)]; cout << ans.val() << endl; return 0; }