MOD = 10 ** 9 + 7 N,d,K = gets.split.map(&:to_i) dp = Array.new(N + 1){Array.new(N * d + 1, 0)} dp[0][0] = 1 (1 .. N).each do |i| (0 .. N * d).each do |s| (1 .. d).each do |d_| dp[i][s] = (dp[i][s] + dp[i - 1][s - d_]) % MOD if s >= d_ end end end puts dp[N][K]