import java.util.Scanner; 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]; boolean[][] r = new boolean[N][N]; for (int i=0; i < M; i++) { int s = scan.nextInt(); int t = scan.nextInt(); r[s][t] = true; r[t][s] = true; } 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=0; j < N; j++) { if (r[i][j]) { v[i][(t+1) % 2] = (v[i][(t+1) % 2] + v[j][t % 2]) % MOD; } } } } System.out.println(v[0][T % 2]); } }