n, m, t = map(int, input().split()) G = [[] for i in range(n)] for _ in range(m): a, b = map(int, input().split()) G[a].append(b) G[b].append(a) cnt = [0] * n cnt[0] = 1 mod = 998244353 from copy import deepcopy for _ in range(t): ncnt = [0] * n for i in range(n): for v in G[i]: ncnt[i] += cnt[v] ncnt[i] %= mod cnt = deepcopy(ncnt) print(cnt[0])