#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
double eps = 1e-8;
int dp[110000][15][20], num[100];
int read() {
  int v = 0, f = 1;
  char c = getchar();
  while (c < 48 || 57 < c) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (48 <= c && c <= 57) v = (v << 3) + v + v + c - 48, c = getchar();
  return v * f;
}
void add(int &a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
int main() {
  int n = read(), k = read(), m = read();
  num[0] = 0;
  for (int i = (int)1; i <= (int)1 << 4; i++) num[i] = num[i >> 1] + (i & 1);
  dp[0][0][0] = 1;
  int mx = (1 << m) - 1;
  for (int i = (int)0; i <= (int)n; i++)
    for (int j = (int)0; j <= (int)k; j++)
      for (int sta = (int)0; sta <= (int)mx; sta++) {
        add(dp[i + 1][j][sta >> 1], dp[i][j][sta]);
        int t = 1ll * dp[i][j][sta] * (1 + num[sta]) % MOD;
        add(dp[i + 1][j + 1][(sta >> 1) + (1 << (m - 1))], t);
      }
  int ans = 0;
  for (int i = (int)0; i <= (int)mx; i++) ans = (ans + dp[n][k][i]) % MOD;
  printf("%d\n", ans);
  return 0;
}
