#include <bits/stdc++.h>
const int N = (int)1e5 + 7;
const int inf = (int)1e9 + 7;
const int mod = (int)1e9 + 7;
const long long linf = (long long)1e18 + 7;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
using namespace std;
void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
int n, k, m;
int nxt(int mask) {
  mask <<= 1;
  if (mask & (1 << m)) mask ^= 1 << m;
  return mask;
}
int dp[N][13][1 << 4];
int calc(int v = 1, int took = k, int mask = 0) {
  if (v > n) {
    if (!took) return 1;
    return 0;
  }
  if (~dp[v][took][mask]) return dp[v][took][mask];
  int res = 0;
  res = calc(v + 1, took, nxt(mask));
  if (took > 0) {
    add(res, calc(v + 1, took - 1, nxt(mask) | 1));
    if (mask)
      add(res, calc(v + 1, took - 1, nxt(mask) | 1) * 1ll *
                   __builtin_popcount(mask) % mod);
  }
  return dp[v][took][mask] = res;
}
int main() {
  cin >> n >> k >> m;
  memset(dp, -1, sizeof(dp));
  cout << calc();
  exit(0);
}
