#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 100005;
int n, k, m, all;
int f[2][15][20], now, sz[20];
void gi(int &x) {
  x = 0;
  register char c = getchar(), pre = 0;
  for (; c < '0' || c > '9'; pre = c, c = getchar())
    ;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + (c ^ 48);
  if (pre == '-') x = -x;
}
int main() {
  gi(n), gi(k), gi(m), all = (1 << m) - 1;
  f[now][0][0] = 1;
  for (int i = (1); i <= (all); i++) sz[i] = sz[i >> 1] + (i & 1);
  for (int i = (n); i >= (1); i--) {
    now ^= 1, memset(f[now], 0, sizeof(f[now]));
    for (int j = (0); j <= (k); j++)
      for (int h = (0); h <= (all); h++) {
        if (h & 1) {
          if (j)
            f[now][j][h] = (f[now][j][h] + f[now ^ 1][j - 1][h >> 1]) % mod;
          for (int p = (1); p <= (m); p++) {
            if (!((h >> 1) & (1 << (p - 1)))) {
              if (j)
                f[now][j][h] = (f[now][j][h] +
                                f[now ^ 1][j - 1][(h >> 1) + (1 << (p - 1))]) %
                               mod;
            }
          }
        } else {
          f[now][j][h] = (f[now][j][h] + f[now ^ 1][j][h >> 1]) % mod;
          if (j)
            f[now][j][h] = (f[now][j][h] + 1ll * (1 + sz[h >> 1]) *
                                               f[now ^ 1][j - 1][h >> 1]) %
                           mod;
          for (int p = (1); p <= (m); p++) {
            if (!((h >> 1) & (1 << (p - 1)))) {
              if (j)
                f[now][j][h] =
                    (f[now][j][h] +
                     1ll * (1 + sz[h >> 1]) *
                         f[now ^ 1][j - 1][(h >> 1) + (1 << (p - 1))]) %
                    mod;
            }
          }
        }
      }
  }
  printf("%d\n", f[now][k][0]);
  return 0;
}
