local mod = 998244353 local function badd(x, y) return (x + y) % mod end local n, m, t = io.read("*n", "*n", "*n") local a, b = {}, {} for i = 1, m do a[i], b[i] = io.read("*n", "*n") a[i], b[i] = a[i] + 1, b[i] + 1 end local dp1, dp2 = {}, {} for i = 1, n do dp1[i] = 0 end dp1[1] = 1 for i = 1, t do local src = i % 2 == 1 and dp1 or dp2 local dst = i % 2 == 1 and dp2 or dp1 for i = 1, n do dst[i] = 0 end for j = 1, m do local aj, bj = a[j], b[j] dst[aj] = badd(dst[aj], src[bj]) dst[bj] = badd(dst[bj], src[aj]) end end local tbl = t % 2 == 1 and dp2 or dp1 print(tbl[1])