#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
const char lf = '\n';
namespace ae86 {
const int bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline int fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline int ty() {
  int a = 0;
  int b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
}  // namespace ae86
using ae86::ty;
const int _ = 209, mo = 1000000007;
template <typename T1, typename T2>
inline T1 ad(T1 &a, T2 b) {
  return a = a + b >= mo ? a + b - mo : a + b;
}
template <typename T1, typename T2>
inline T1 dl(T1 &a, T2 b) {
  return a = a >= b ? a - b : a - b + mo;
}
template <typename T1, typename T2>
inline T1 add(T1 a, T2 b) {
  return a + b >= mo ? a + b - mo : a + b;
}
template <typename T1, typename T2>
inline T1 del(T1 a, T2 b) {
  return a >= b ? a - b : a - b + mo;
}
long long powa(long long a, long long t) {
  long long b = 1;
  a = (a + mo) % mo;
  while (t) {
    if (t & 1) b = b * a % mo;
    a = a * a % mo, t >>= 1;
  }
  return b;
}
inline long long inva(long long a) { return powa(a, mo - 2); }
const int M = _;
struct martix {
  long long val[M][M];
  long long *operator[](int x) { return val[x]; }
  void be0() { memset(val, 0, sizeof(val)); }
  void be1() {
    memset(val, 0, sizeof(val));
    for (int i = 0; i < M; i++) val[i][i] = 1;
  }
  martix() { be0(); }
  friend martix operator*(martix a, martix b) {
    martix c;
    c.be0();
    for (int i = 0; i < M; i++)
      for (int j = 0; j < M; j++)
        for (int k = 0; k < M; k++) ad(c[i][j], a[i][k] * b[k][j] % mo);
    return c;
  }
};
martix powa(martix a, long long t) {
  martix b;
  b.be1();
  while (t) {
    if (t & 1) b = b * a;
    a = a * a, t >>= 1;
  }
  return b;
}
int n, m, len, mm, stat, bcnt[_] = {0};
inline int xy2a(int x, int y) { return x * mm + y; }
int main() {
  ios::sync_with_stdio(0), cout.tie(nullptr);
  n = ty(), len = ty(), m = ty();
  mm = 1 << m, stat = mm * (len + 1);
  bcnt[0] = 0;
  for (int i = 1; i < mm; i++) bcnt[i] = bcnt[i >> 1] + (i & 1);
  martix tran;
  for (int i = 0; i < mm; i++)
    for (int j = 0; j <= len; j++) {
      int a = (i << 1) & (mm - 1);
      ad(tran[xy2a(j, i)][xy2a(j, a)], 1);
      if (j < len) ad(tran[xy2a(j, i)][xy2a(j + 1, a + 1)], bcnt[i] + 1);
    }
  martix bas;
  bas[0][0] = 1, bas = bas * powa(tran, n);
  long long ans = 0;
  for (int i = 0; i < mm; i++) ad(ans, bas[0][xy2a(len, i)]);
  cout << ans << lf;
  return 0;
}
