#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	ll n, h, d;
	cin >> n >> h >> d;

	ll raise_sum = 1;
	ll raise_prod = 1;
	for (int i = 2; i <= n; ++i) {
		raise_prod = raise_prod * i % MOD;
		raise_sum = (raise_sum + raise_prod) % MOD;
	}

	// Initially n! sets order
	// Selecting k at a level gives k! to setting next order

	vector<ll> pref_sums = {raise_prod};
	for (int k = 1; k <= h; ++k) {
		ll below = (pref_sums[k-1] - (k > d ? pref_sums[k-(d+1)] : 0)) % MOD;
		if (below < 0) below += MOD;

		ll row_sum = below * raise_sum % MOD;
		ll row_add = (row_sum + pref_sums.back()) % MOD;
		pref_sums.push_back(row_add);

		if (k == h) {
			cout << below << '\n';
		}
	}

}
