const val P = 1000000007L

fun modPlus(x1: Long, x2: Long) = (x1 + x2) % P
fun modMinus(x1: Long, x2: Long) = (x1 + P - x2) % P
fun modTimes(x1: Long, x2: Long) = x1 * x2 % P

fun main(args: Array<String>) {
    val (n, h, d) = readLine()!!.split(" ").map { it.toInt() }
    val factorials = LongArray(n + 1)
    factorials[0] = 1L
    for (i in 1..n) {
        factorials[i] = modTimes(i.toLong(), factorials[i - 1])
    }
    var x = 0L
    for (i in 1..n) {
        x = modPlus(x, factorials[i])
    }

    val dp = LongArray(h + 1)
    val dpSum = LongArray(h + 1)
    dp[1] = factorials[n]
    dpSum[1] = dp[1]
    for (i in 2..h) {
        val factor = modMinus(dpSum[i - 1], dpSum[Math.max(i - d - 1, 0)])
        dp[i] = modPlus(modTimes(factor, x), if (i <= d) factorials[n] else 0L)
        dpSum[i] = modPlus(dpSum[i - 1], dp[i])
    }
    println(dp[h])
}