#include using namespace std; int main() { int64_t N, M, T; cin >> N >> M >> T; int64_t mod = 998244353; int64_t s, t; vector> G(N); for(int64_t i = 0; i < M; i++) { cin >> s >> t; G.at(s).push_back(t); G.at(t).push_back(s); } vector ans(N); ans.at(0) = 1; for(int64_t day = 1; day <= T; day++) { vector pass(N); pass.at(0) = true; vector count(N); queue q; q.push(0); while(!q.empty()) { int64_t p = q.front(); q.pop(); for(int64_t g : G.at(p)) { count.at(g) += ans.at(p); count.at(g) %= mod; if(!pass.at(g)) { pass.at(g) = true; q.push(g); } } } for(int64_t i = 0; i < N; i++) ans.at(i) = count.at(i); } cout << ans.at(0) << endl; return 0; }