#include<stdio.h>
#include<iostream>
#include<string.h>
#include<algorithm>
#include<stdlib.h>
#include<math.h>
#include<set>
#include<map>
#include<vector>
using namespace std;
const long long M=1000000007;
int n,h,d,i,j;
long long f[1000005],s[1000005],ans;
int main()
{
	cin>>n>>h>>d;
	f[0]=1;
	for(i=1;i<=n;i++)
	{
		f[0]=f[0]*i%M;
		ans=(ans+f[0])%M;
	}
	s[0]=f[0];
	for(i=1;i<h;i++)
	{
		if(i<=d)
			f[i]=s[i-1]*ans%M;
		else
			f[i]=(s[i-1]-s[i-d-1])*ans%M;
		s[i]=(s[i-1]+f[i])%M;
	}
	cout<<((s[h-1]-s[h-1-d])%M+M)%M<<endl;
}
