#include<cstdio>
typedef long long ll;
const int mod=1000000007;
int f[1000050],g[1000050],s[1000050];
int main(){
	int n,h,d,p,i;
	scanf("%d%d%d",&n,&h,&d);
	f[0]=f[1]=1;
	for(i=2;i<=n;++i)f[i]=(ll)f[i-1]*i%mod;
	p=2;
	for(i=2;i<=n;++i)p=(p+f[i])%mod;
	s[1]=g[1]=f[n];
	for(i=2;i<=d;++i)s[i]=(s[i-1]+(g[i]=(ll)g[i-1]*p%mod))%mod;
	for(i=d+1;i<=h;++i){
		g[i]=(ll)(s[i-1]-s[i-d-1]+mod)*(p-1+mod)%mod;
		s[i]=(s[i-1]+g[i])%mod;
	}
	printf("%d\n",g[h]);
	return 0;
}