#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <unordered_map>

using namespace std;

typedef pair<long long int, long long int> P;

long long int INF = 1e18;
long long int MOD = 1e9 + 7;

long long int DP[1100000] = {};

int main(){
    long long int N, D, H;
    cin >> N >> H >> D;
    long long int factN = 1, factS = 0;
    for(int i = 1; i <= N; i++){
        factN *= i;
        factN %= MOD;
        factS += factN;
        factS %= MOD;
    }
    DP[0] = factN;
    long long int S = factN;
    for(int i = 1; i < D; i++){
        DP[i] = S * factS % MOD;
        S += DP[i];
        S %= MOD;
    }
    for(int i = D; i < H; i++){
        DP[i] = S * factS % MOD;
        S += DP[i];
        S -= DP[i - D];
        S += MOD;
        S %= MOD;
    }
    cout << S << endl;
    return 0;
}