#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
long long D[1010000], S[1010000], Mod = 1000000007;
int n, H, d;
long long Sum(int b, int e) {
	if (b <= 0)return S[e];
	return (S[e] - S[b - 1] + Mod) % Mod;
}
int main() {
	scanf("%d%d%d", &n, &H, &d);
	D[0] = 1;
	int i;
	long long s = 0;
	for (i = 1; i <= n; i++) {
		D[0] = D[0] * i%Mod;
		s = (s + D[0]) % Mod;
	}
	S[0] = D[0];
	for (i = 1; i <= H; i++) {
		D[i] = Sum(i - d, i - 1)*s%Mod;
		S[i] = (S[i - 1] + D[i]) % Mod;
	}
	printf("%lld\n", Sum(H - d, H - 1));
}