#include #include using namespace std; using namespace atcoder; typedef int64_t lint; #define rep(i, n) for(int i=0; i; using vvi = vector>; template inline void vin(vector& v) { rep(i, v.size()) cin >> v.at(i); } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template inline void drop(T x) { cout << x << endl; exit(0); } template void vout(vector v) { rep(i, v.size()) { cout << v.at(i) << ' '; } cout << endl; } constexpr lint LINF = LLONG_MAX/2; using mint = modint998244353; using vm = vector; vector> G; void make_graph(int N, int M) { G.resize(N); int x, y; rep(i, M) { cin >> x >> y; G[x].push_back(y); G[y].push_back(x); } } int main() { lint N, M, T; cin >> N >> M >> T; make_graph(N, M); lint a=0, b=0, c=0, x, y, z; vm dp(N), dp1(N); dp[0] = 1; rep(_, T) { rep(i, N) { for (auto t : G[i]) { dp1[i] += dp[t]; } } swap(dp, dp1); rep(i, N) dp1[i] = 0; } std::cout << dp[0].val() << '\n'; }