#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
int dp[N][15][1 << 4];
int main() {
  int n, k, m;
  scanf("%d%d%d", &n, &k, &m);
  dp[0][0][0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= k; j++) {
      for (int sta = 0; sta < (1 << m); sta++) {
        int nex = (sta << 1) & ((1 << m) - 1),
            cnt = __builtin_popcount(sta) + 1;
        (dp[i + 1][j][nex] += dp[i][j][sta]) %= mod;
        (dp[i + 1][j + 1][nex | 1] += 1ll * dp[i][j][sta] * cnt % mod) %= mod;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < (1 << m); i++) (ans += dp[n][k][i]) %= mod;
  printf("%d\n", ans);
  return 0;
}
