import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int t = sc.nextInt(); int[] a = new int[m]; int[] b = new int[m]; for (int i = 0; i < m; i++) { a[i] = sc.nextInt(); b[i] = sc.nextInt(); } sc.close(); int mod = 998244353; long[] ans = new long[n]; ans[0] = 1; for (int i = 0; i < t; i++) { long[] wk = new long[n]; for (int j = 0; j < m; j++) { wk[a[j]] += ans[b[j]]; wk[b[j]] += ans[a[j]]; } for (int j = 0; j < n; j++) { wk[j] %= mod; } ans = wk; } System.out.println(ans[0]); } }