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

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

const ll MOD = 1000000007;

ll modpow(ll x,ll k){
	if(k == 0)return 1;
	ll ret = modpow(x,k/2);
	ret *= ret; ret %= MOD;
	if(k%2 == 1){
		ret *= x; ret %= MOD;
	}
	return ret;
}

int main(){
	ll n,h,d;
	cin >> n >> h >> d;
	
	static ll dp[1000010];
	dp[0] = 1;
	
	ll x = 1;
	ll y = 0;
	for(int i = 1 ; i <= n ; i ++){
		x *= i; x %= MOD;
		y += x; y %= MOD;
	}
	ll sum = 0;
	for(int i = 0 ; i < h ; i ++){
		if(i > 0){dp[i] *= y; dp[i] %= MOD;}
		sum += dp[i];
		if(i >= d)sum += MOD-dp[i-d];
		sum %= MOD;
		dp[i+1] = sum;
	}
	cout << (dp[h]*x)%MOD << endl;
}