#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, K, m;
int num[1 << 4 | 1];
int id[13][1 << 4 | 1], tot;
struct Mat {
  int x, y;
  int m[211][211];
  Mat(int a, int b) { x = a, y = b; }
  inline void Zero() { memset(m, 0, sizeof(m)); }
  inline void One() {
    memset(m, 0, sizeof(m));
    for (int i = 1; i <= x; i++) m[i][i] = 1;
  }
  inline Mat operator*(const Mat &A) const {
    Mat C(x, A.y);
    C.Zero();
    for (int i = 1; i <= x; i++) {
      for (int k = 1; k <= y; k++) {
        for (int j = 1; j <= A.y; j++) {
          (C.m[i][j] += m[i][k] * 1ll * A.m[k][j] % mod) %= mod;
        }
      }
    }
    return C;
  }
};
inline Mat Pow(Mat a, int n) {
  Mat ans = Mat(a.x, a.y);
  ans.One();
  for (; n; n >>= 1, a = a * a)
    if (n & 1) ans = ans * a;
  return ans;
}
int main() {
  scanf("%d%d%d", &n, &K, &m);
  int Lim = 1 << m;
  for (int S = 0; S < Lim; S++) {
    num[S] = num[S >> 1] + (S & 1);
    for (int i = 0; i <= K; i++) {
      id[i][S] = ++tot;
    }
  }
  Mat A = Mat(tot, 1), B = Mat(tot, tot);
  A.Zero(), B.Zero();
  A.m[1][1] = 1;
  for (int i = 0; i <= K; i++) {
    for (int S = 0; S < Lim; S++) {
      if (i < K) B.m[id[i + 1][(S >> 1) | (1 << m - 1)]][id[i][S]] = num[S] + 1;
      B.m[id[i][S >> 1]][id[i][S]] = 1;
    }
  }
  B = Pow(B, n);
  A = B * A;
  int Ans = 0;
  for (int S = 0; S < Lim; S++) (Ans += A.m[id[K][S]][1]) %= mod;
  printf("%d\n", Ans);
  return 0;
}
