N, M, T = gets.split.map(&:to_i) MOD = 998244353 edges = [] M.times do s, t = gets.split.map { |s| s.to_i - 1 } edges << [s, t] end dp = Array.new(N, 0) dp[0] = 1 T.times do dp2 = Array.new(N, 0) edges.each do |s, t| dp2[s] += dp[t] dp2[t] += dp[s] end N.times do |i| dp2[i] %= MOD end dp = dp2 end puts dp[0] % MOD