#include <vector>
#include <iostream>
using namespace std;

const int M = 1000000007;

int main() {
    int n, h, d; cin >> n >> h >> d;
    long long coeff = 0;
    for (int i = n; i >= 1; i--) coeff = i * (1 + coeff) % M;
    vector<long long> dp(h, 0), acc(h+1, 0);
    dp[0] = 1;
    for (int i = 2; i <= n; i++) dp[0] = dp[0] * i % M;
    acc[1] = dp[0];
    for (int i = 1; i < h; i++) {
        dp[i] = (acc[i] - acc[max(0, i-d)]) * coeff % M;
        acc[i+1] = (acc[i] + dp[i]) % M;
    }
    cout << ((acc[h] - acc[h-d]) % M + M) % M << endl;
}
