#include<iostream>
using namespace std;
long N,H,D,mod=1e9+7;
//1-indexed
#include<vector>
template<typename T>
struct BIT{
	int n;
	vector<T>bit;
	BIT(int n_=0,T a=0):n(n_),bit(n_+1,a){}
	T sum(int i)
	{
		T ans=0;
		for(;i>0;i-=i&-i)(ans+=bit[i])%=mod;
		return ans;
	}
	void add(int i,T a)
	{
		if(i==0)return;
		for(;i<=n;i+=i&-i)(bit[i]+=a)%=mod;
	}
};
int main()
{
	cin>>N>>H>>D;
	BIT<long>P(H);
	long s=0,p=1;
	for(int i=1;i<=N;i++)
	{
		p=p*i%mod;
		s=(s+p)%mod;
	}
	for(int i=0;i<D;i++)if(i<H)P.add(i+1,p);
	for(int i=1;i<H;i++)
	{
		P.add(i+1,(P.sum(i)-P.sum(i-D))*s%mod);
	}
	cout<<((P.sum(H)-P.sum(H-1))%mod+mod)%mod<<endl;
}
