#line 1 "main.cpp" #include #include // #include "library/templates/template.cpp" using namespace atcoder; using namespace std; using ll = long long int; using ull = unsigned long long int; using ld = long double; using pii = pair; using pll = pair; using mint = modint998244353; long long solve(int N, int T, const vector> &g) { vector dp(N, 0); dp[0] = 1; for (int t = 0; t < T; t++) { vector nxtdp(N, 0); for (int x = 0; x < N; x++) { // nxtdp[x] += dp[x]; for (int y : g[x]) { nxtdp[x] += dp[y]; } } swap(dp, nxtdp); } return dp[0].val(); } int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); int N, M, T; std::cin >> N >> M >> T; vector> g(N); for (int i = 0; i < M; ++i) { int u, v; cin >> u >> v; g[u].push_back(v); g[v].push_back(u); } auto ans = solve(N, T, g); std::cout << ans << '\n'; return 0; }