#include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define FOR(i, l, r) for(int i = (l); i <= (r); ++i)
#define REP(i, n) FOR(i, 0, (n) - 1)
#ifdef DEBUG
  template<class A, class B> ostream& operator<<(ostream &out, const pair<A, B> &p) {
	  return out << '(' << p.first << ", " << p.second << ')';
  }
  template<class T> auto operator<<(ostream &out, T &&x) -> decltype(x.begin(), out) {
	  out << '{';
	  for(auto it = x.begin(); it != x.end(); ++it)
		  out << *it << (it == --x.end() ? "" : ", ");
	  return out << '}';
  }
  void dump() {}
  template<class T, class... Args> void dump(T &&x, Args... args) {
	  cerr << x << ";  ";
	  dump(args...);
  }
  const int seed = 1;
  struct Nl{~Nl(){cerr << '\n';}};
# define debug(x...) cerr << (#x != "" ? #x ":  " : ""), dump(x), Nl(), cerr
#else
  const int seed = chrono::system_clock::now().time_since_epoch().count();
# define debug(...) 0 && cerr
#endif
mt19937_64 rng(seed);
int rd(int l, int r) {
	return uniform_int_distribution<int>(l, r)(rng);
}
template<class T> int size(T a) { return a.size(); }

LL mod = 1e9 + 7;

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

	LL n, h, d;
	cin >> n >> h >> d;

	vector<LL> dp(h + 1);

	LL f = 1;
	LL sum = 1;
	for(LL i = 1; i <= n; i++)
	{
		f = (f * i) % mod;
		sum = (sum + f) % mod;
	}

	debug(f, sum);

	dp[0] = 1;
	dp[1] = f;
	for(int i = 2; i <= d && i <= h; i++)
	{
		dp[i] = (dp[i - 1] * sum) % mod;
		debug(i, dp[i]);
	}

	if(h <= d)
	{
		cout << dp[h] << "\n";
		return 0;
	}

	LL last_d = 0;
	for(int i = 1; i <= d; i++)
		last_d = (last_d + dp[i]) % mod;

	sum = (sum - 1 + mod) % mod;
	for(int i = d + 1; i <= h; i++)
	{
		debug(i, dp[i], last_d);
		dp[i] = (last_d * sum) % mod;
		last_d = (last_d + dp[i] - dp[i - d] + mod) % mod;
	}

	cout << dp[h] << "\n";

}

