#include <bits/stdc++.h>
const int N = 100010, K = 13, MOD = 1000000007;
void inc(int a, int &b) { b = (a + b) % MOD; }
int f[N][K][16], cnt[16];
int n, k, m, S;
void dp() {
  f[n][0][0] = 1;
  for (int i = n; i; i--)
    for (int j = 0; j <= k; j++)
      for (int x = 0; x < S; x++) {
        int v = f[i][j][x];
        if (!v) continue;
        inc(v, f[i - 1][j][(x << 1) & (S - 1)]);
        inc((long long)v * (cnt[x] + 1) % MOD,
            f[i - 1][j + 1][((x << 1) & (S - 1)) | 1]);
      }
}
int main() {
  scanf("%d%d%d", &n, &k, &m);
  S = 1 << m;
  for (int i = 1; i < S; i++) cnt[i] = cnt[i >> 1] + (i & 1);
  dp();
  int ans = 0;
  for (int x = 0; x < S; x++) inc(f[0][k][x], ans);
  printf("%d\n", ans);
  return 0;
}
