#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXVISITS = 12;
const int MAXFORWARD = 4;
const int MAXDIM = 161;
const int MOD = 1000000007;
void inc(int &a, int b) {
  if ((a += b) >= MOD) a -= MOD;
}
int nplanets, nvisits, nforward;
int dim;
vector<pair<int, int>> states;
void mmlt(vector<vector<int>> &A, const vector<vector<int>> &B) {
  vector<vector<int>> C(dim, vector<int>(dim));
  for (int i = (0); i < (dim); ++i)
    for (int j = (0); j < (dim); ++j) {
      int cur = 0;
      for (int k = (0); k < (dim); ++k)
        cur = (cur + (long long)A[i][k] * B[k][j]) % MOD;
      C[i][j] = cur;
    }
  for (int i = (0); i < (dim); ++i)
    for (int j = (0); j < (dim); ++j) A[i][j] = C[i][j];
}
vector<vector<int>> mpw(vector<vector<int>> x, int n) {
  vector<vector<int>> ret(dim, vector<int>(dim, 0));
  for (int i = (0); i < (dim); ++i) ret[i][i] = 1;
  while (true) {
    if (n & 1) mmlt(ret, x);
    if ((n >>= 1) == 0) return ret;
    mmlt(x, x);
  }
}
vector<vector<int>> A;
vector<vector<int>> B;
int solve() {
  states.clear();
  for (int i = (0); i < (nvisits); ++i)
    for (int mask = (0); mask < (1 << nforward); ++mask) {
      int cnt = 0;
      for (int k = (0); k < (nforward); ++k)
        if (mask & (1 << k)) ++cnt;
      if (cnt > i) continue;
      states.push_back(make_pair(i, mask));
    }
  states.push_back(make_pair(nvisits, 0));
  dim = ((int)(states).size());
  assert(dim <= MAXDIM);
  A = vector<vector<int>>(dim, vector<int>(dim, 0));
  for (int i = (0); i < (((int)(states).size())); ++i) {
    int cnt = 0;
    for (int k = (0); k < (nforward); ++k)
      if (states[i].second & (1 << k)) ++cnt;
    for (int j = (0); j < (((int)(states).size())); ++j) {
      if (states[j].first == states[i].first &&
          states[j].second == ((states[i].second << 1) & ((1 << nforward) - 1)))
        inc(A[i][j], 1);
      if (states[j].first == states[i].first + 1 &&
          (states[j].first == nvisits && states[j].second == 0 ||
           states[j].first < nvisits &&
               states[j].second ==
                   (((states[i].second << 1) | 1) & ((1 << nforward) - 1))))
        inc(A[i][j], cnt + 1);
    }
  }
  B = mpw(A, nplanets);
  return B[0][dim - 1];
}
void run() {
  scanf("%d%d%d", &nplanets, &nvisits, &nforward);
  printf("%d\n", solve());
}
int main() {
  run();
  return 0;
}
