#include <bits/stdc++.h>
using namespace std;
long long gi() {
  char cc = getchar();
  long long cn = 0, flus = 1;
  while (cc < '0' || cc > '9') {
    if (cc == '-') flus = -flus;
    cc = getchar();
  }
  while (cc >= '0' && cc <= '9') cn = cn * 10 + cc - '0', cc = getchar();
  return cn * flus;
}
const long long N = 1e5 + 5;
const long long K = 15;
const long long M = 1 << 6;
const long long P = 1e9 + 7;
long long n, k, m, dp[3][K][M], Ans;
void inc(long long &x, long long y) { ((x += y) >= P) && (x -= P); }
long long sz(long long x) {
  long long cnt = 0;
  if (x & 1) ++cnt;
  if ((x >> 1) & 1) ++cnt;
  if ((x >> 2) & 1) ++cnt;
  if ((x >> 3) & 1) ++cnt;
  if ((x >> 4) & 1) ++cnt;
  return cnt;
}
signed main() {
  n = gi(), k = gi(), m = gi();
  dp[0][0][0] = 1;
  long long maxn = (1 << (m + 1)) - 1;
  long long x = 1 << (m);
  for (register long long i = 1; i <= n; ++i) {
    for (register long long j = 0; j <= k; ++j)
      for (register long long r = 0; r <= maxn; ++r) dp[i & 1][j][r] = 0;
    for (register long long j = 0; j <= k; ++j) {
      for (register long long r = 0; r <= maxn; ++r) {
        inc(dp[i & 1][j][r >> 1], dp[(i - 1) & 1][j][r]);
        if (j != k)
          inc(dp[i & 1][j + 1][x | (r >> 1)],
              sz(x | (r >> 1)) * dp[(i - 1) & 1][j][r] % P);
      }
    }
  }
  for (register long long r = 0; r <= maxn; ++r) inc(Ans, dp[n & 1][k][r]);
  cout << Ans % P << endl;
  return 0;
}
