#include // #include #include using namespace std; // using namespace atcoder; using bint = boost::multiprecision::cpp_int; using ll = long long; using ull = unsigned long long; using P = pair; using vi = vector; using vvi = vector; using vvvi = vector; #define rep(i,n) for(ll i = 0;i < (ll)n;i++) #define ALL(x) (x).begin(),(x).end() #define sz(c) ((ll)(c).size()) #define LB(A,x) (int)(lower_bound(A.begin(),A.end(),x)-A.begin()) #define UB(A,x) (int)(upper_bound(A.begin(),A.end(),x)-A.begin()) // #define MOD 1000000007 #define MOD 998244353 templateusing min_priority_queue=priority_queue,greater>; templateostream&operator<<(ostream&os,vector&v){for(int i = 0;i < v.size();i++)os<istream&operator>>(istream&is,vector&v){for(T&in:v)is>>in;return is;} templateostream&operator<<(ostream&os,pair&p){os<istream&operator>>(istream&is,pair&p){is>>p.first>>p.second;return is;} int main(){ ios_base::sync_with_stdio(0), cin.tie(0); int n,m,K; cin >> n >> m >> K; map,ll> mp; vvi v(n); rep(i,m){ int a,b;cin >> a >> b; a--;b--; v[a].emplace_back(b); v[b].emplace_back(a); } auto dfs = [&](auto &dfs,vector &msk,int ov)->ll{ if(mp.count(msk))return mp[msk]; bool is = true; rep(i,n)if(msk[i] != K)is = false; if(is)return mp[msk] = 1; ll res = 0; for(auto nv : v[ov]){ if(msk[nv] == K)continue; msk[nv]++; msk[n] = nv; (res += dfs(dfs,msk,nv))%= MOD; msk[nv]--; } msk[n] = ov; return mp[msk] = res; }; ll res = 0; vector msk(n+1); rep(i,n){ msk[i] = 1; msk[n] = i; (res += dfs(dfs,msk,i))%= MOD; msk[i] = 0; } cout << res << "\n"; return 0; }