#include <iostream>
#include <vector>

using namespace std;

const int MOD = 1000000007;

vector<long long> fact(1000001, 1);

int solve(int N, int H, int D){
    vector<long long> dp(H, 0);
    dp[0] = fact[N];
    long long factSum = 0;
    for(int i=1;i<=N;i++) factSum = (factSum + fact[i]) % MOD;
    long long sum = dp[0];
    for(int i=1;i<H;i++){
        dp[i] = (sum * factSum) % MOD;
        sum = (sum + dp[i]) % MOD;
        if(i - D >= 0) sum = (sum + MOD - dp[i-D]) % MOD;
    }
    return sum;
}

int main(){
    fact[0] = fact[1] = 1;
    for(int i=2;i<=1000000;i++) fact[i] = (fact[i-1]*i) % MOD;
    int N, H, D;
    while(cin >> N >> H >> D){
        cout << solve(N, H, D) << endl;
    }
}