const MOD: usize = 998244353; fn main() { let mut nmt = String::new(); std::io::stdin().read_line(&mut nmt).ok(); let nmt: Vec = nmt.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let n = nmt[0]; let m = nmt[1]; let t = nmt[2]; let mut paths = vec![vec![]; n]; for _ in 0..m { let mut st = String::new(); std::io::stdin().read_line(&mut st).ok(); let st: Vec = st.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let s = st[0]; let t = st[1]; paths[s].push(t); paths[t].push(s); } let mut dp = vec![vec![0usize; n]; t+1]; dp[0][0] = 1; for i in 0..t { for j in 0..n { for &v in paths[j].iter() { dp[i+1][v] += dp[i][j]; dp[i+1][v] %= MOD; } } } println!("{}", dp[t][0]); }