N,M,T=map(int,input().split()) graph=[[] for x in range(N)] for m in range(M): s,t=map(int,input().split()) graph[s].append(t) graph[t].append(s) dp=[0]*N dp[0]=1 mod=998244353 for t in range(T): dp=[sum(dp[y] for y in graph[x])%mod for x in range(N)] ans=dp[0] print(ans)