#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#ifdef DEBUG
#define display(x) cerr << #x << " = " << x << endl;
#define displaya(a, st, n)\
	{cerr << #a << " = {";\
	for(int qwq = (st); qwq <= (n); ++qwq) {\
		if(qwq == (st)) cerr << a[qwq];\
		else cerr << ", " << a[qwq];\
	} cerr << "}" << endl;}
#define displayv(v) displaya(v, 0, (int)(v).size() - 1)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define display(x) ;
#define displaya(a, st, n) ;
#define displayv(v) ;
#define eprintf(...) if(0) fprintf(stderr, "...")
#endif
template<typename T> bool chmin(T &a, const T &b) { return b < a ? a = b, true : false; }
template<typename T> bool chmax(T &a, const T &b) { return a < b ? a = b, true : false; }

const LL P = 1000000007;
LL f[1000000 + 233], g[1000000 + 233];

int main() {
	ios::sync_with_stdio(false);
	int n, d, h;
	cin >> n >> h >> d;
	LL fac = 1, sum = 0;
	for(int i = 1; i <= n; ++i) fac = fac * i % P, (sum += fac) %= P;
	f[0] = fac;
	memset(g, 0, sizeof(g));
	g[0] = f[0];
	for(int i = 1; i < h; ++i) {
//		for(int j = max(0, i - d); j < i; ++j)
//			f[i] += f[j];
		if(i - d <= 0) f[i] = g[i - 1];
		else f[i] = (g[i - 1] - g[i - d - 1]) % P;
		f[i] = f[i] % P * sum % P;
		g[i] = (g[i - 1] + f[i]) % P;
	}
	LL ans = 0;
	for(int j = max(0, h - d); j < h; ++j) ans += f[j];
	cout << (ans % P + P) % P << endl;
	return 0;
}
