#include <bits/stdc++.h>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define ALL(c) (c).begin(),(c).end()
#define dump(x) cout << #x << " = " << (x) << endl
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n-1); }

template<class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
	os<<"("<<p.first<<","<<p.second<<")";
	return os;
}
 
template<class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
	os<<"{";
	rep(i, v.size()) {
		if (i) os<<",";
		os<<v[i];
	}
	os<<"}";
	return os;
}

const ll MOD = TEN(9) + 7;
const int maxn = TEN(6) + 10;

inline void add(ll &x, ll y) {
	x += y;
	if (x >= MOD) x -= MOD;
}

ll dp[maxn];
ll ps[maxn];

int main() {
	int N, H, D;
	cin >> N >> H >> D;
	ll k = 1;
	ll s = 0;
	for (int i = 1; i <= N; ++i) {
		k = k * i % MOD;
		add(s, k);
	}

	for (int i = 1; i <= H; ++i) {
		ps[i] = ps[i-1];
		dp[i] = ps[i] - ps[max(0, i-D-1)];
		
		if (dp[i] < 0) dp[i] += MOD;
		dp[i] = dp[i] * s % MOD;
		if (i <= D) add(dp[i], k);
		add(ps[i], dp[i]);
	}

	cout << dp[H] << endl;

	return 0;
}