#include #include using namespace std; using LL = long long; constexpr int MOD = 998244353; int dp[1001][1001]; int main() { int N, M, T; cin >> N >> M >> T; vector G[N + 1]; int s, t; for (int i = 0; i < M; i++) { cin >> s >> t; G[s].push_back(t); G[t].push_back(s); } dp[0][0] = 1; for (int i = 1; i <= T; i++) { for (int j = 0; j <= N; j++) { if (dp[i - 1][j]) { for (int k: G[j]) { dp[i][k] = (dp[i][k] + dp[i - 1][j]) % MOD; } } } } cout << dp[T][0] << endl; }