#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
long long qpow(long long a, long long b) {
  long long ans = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b > 0 ? gcd(b, a % b) : a; }
int a[maxn];
int dp[maxn][15][1 << 4];
int main() {
  int n, m, T, k;
  cin >> n >> k >> m;
  dp[0][0][0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < k + 1; j++) {
      for (int u = 0; u < (1 << m); u++) {
        dp[i + 1][j][u >> 1] = (dp[i + 1][j][u >> 1] + dp[i][j][u]) % mod;
        int ways = __builtin_popcount(u) + 1;
        int temp = 1ll * ways * dp[i][j][u] % mod;
        dp[i + 1][j + 1][u >> 1 | (1 << m - 1)] =
            (dp[i + 1][j + 1][u >> 1 | (1 << m - 1)] + temp) % mod;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < 1 << m; i++) {
    ans = (ans + dp[n][k][i]) % mod;
  }
  cout << ans << endl;
  return 0;
}
