#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; const int MOD=998244353; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll n,m,t; cin>>n>>m>>t; vector S(m),T(m); rep(i,m) cin>>S[i]>>T[i]; vector A(n); A[0]=1; rep(i,t){ vector B(n); rep(j,m){ B[S[j]]=(B[S[j]]+A[T[j]])%MOD; B[T[j]]=(B[T[j]]+A[S[j]])%MOD; } swap(A,B); } cout<