#include #if __has_include() #include using namespace atcoder; #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using std::cin; using std::cout; using std::vector; using mint = modint998244353; int main() { int n, m, t; cin >> n >> m >> t; vector> to(n); rep(i, m) { int s, t; cin >> s >> t; to[s].push_back(t); to[t].push_back(s); } vector dp(n); dp[0] = 1; rep(i, t) { vector p(n); swap(dp, p); rep(j, n) { for (int k : to[j]) { dp[j] += p[k]; } } } cout << dp[0].val() << '\n'; return 0; }