N,M,T = map(int,input().split()) MOD = 998244353 G = {i:[] for i in range(N)} for _ in range(M): s,t = map(int,input().split()) G[s].append(t) G[t].append(s) dp = [[0 for _ in range(N)] for _ in range(T+1)] dp[0][0] = 1 for t in range(1,T+1): for i in range(N): for j in G[i]: dp[t][i] = (dp[t][i]+dp[t-1][j])%MOD print(dp[T][0])