import java.util.Scanner; import java.util.List; import java.util.ArrayList; public class No1749 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int M = scan.nextInt(); int T = scan.nextInt(); int MOD = 998244353; int[][] v = new int[N][2]; List> r = new ArrayList>(); for (int i=0; i < N; i++) { r.add(new ArrayList()); } for (int i=0; i < M; i++) { int s = scan.nextInt(); int t = scan.nextInt(); r.get(s).add(t); r.get(t).add(s); } v[0][0] = 1; for (int t=0; t < T; t++) { for (int i=0; i < N; i++) { v[i][(t+1) % 2] = 0; for (int j : r.get(i)) { v[i][(t+1) % 2] = (v[i][(t+1)%2] + v[j][t % 2]) % MOD; } } } System.out.println(v[0][T % 2]); } }