#include #include using namespace std; using LL = long long; using P = pair; using Graph = vector>; const int INF = 1 << 29; const long long LINF = 1LL << 60; #define all(x) (x).begin(), (x).end() #define rep(i,n) for(int i = 0; i < (n); ++i) templatevoid chmin(T&a, T b){if(a > b) a = b;} templatevoid chmax(T&a, T b){if(a < b) a = b;} int main(){ int N, M, T; cin >> N >> M >> T; vector> path(N, vector(N, false)); for(int i = 0; i < M; ++i){ int s, t; cin >> s >> t; path[s][t] = true; path[t][s] = true; } vector> dp(T+1, vector(N, 0)); dp[0][0] = 1; for(int t = 1; t <= T; ++t){ for(int n = 0; n < N; ++n){ //t日目のnの都市について考える long long tmp = 0; for(int p = 0; p < N; ++p){ if(path[n][p]) tmp += dp[t-1][p] % 998244353; } dp[t][n] = tmp; } } /* for(int i = 0; i < T; ++i){ for(int j = 0; j < N; ++j){ cout << dp[i][j] << " "; } cout << endl; } */ cout << dp[T][0] << endl; }