n,m,T = map(int,input().split()) load = [[] for i in range(n)] for i in range(m): s,t = map(int,input().split()) load[s].append(t) load[t].append(s) mod = 998244353 dp = [0 for i in range(n)] dp[0] = 1 for i in range(T): new = [0 for j in range(n)] for j in range(n): for k in load[j]: new[j] += dp[k] new[j] %= mod dp = new print(dp[0])