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