#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() const ll mod = 998244353ll; int main() { cin.tie(nullptr); int N, M, T; cin >> N >> M >> T; vector G(N, vector()); rep(i, 0, M) { int s, t; cin >> s >> t; G[s].push_back(t); G[t].push_back(s); } vector now(N, 0), pre(N, 0); pre[0] = 1; rep(day, 0, T) { rep(i, 0, N) now[i] = 0; rep(v, 0, N) { for (int next : G[v]) { now[v] += pre[next]; now[v] %= mod; } } rep(i, 0, N) pre[i] = now[i]; } cout << now[0] << '\n'; }