#include <bits/stdc++.h>
using namespace std;
const int mod = (1e9) + 7;
int n, k, m;
int dp[100005][13][(1 << 4) + 5];
int main() {
  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 mask = 0; mask < (1 << m); mask++) {
        int newmask = (mask << 1) % (1 << m);
        dp[i + 1][j][newmask] = (dp[i + 1][j][newmask] + dp[i][j][mask]) % mod;
        if (j < k) {
          int f = __builtin_popcount(mask) + 1;
          dp[i + 1][j + 1][newmask + 1] =
              (dp[i + 1][j + 1][newmask + 1] + 1LL * f * dp[i][j][mask]) % mod;
        }
      }
    }
  }
  int sol = 0;
  for (int mask = 0; mask < (1 << m); mask++)
    sol = (sol + dp[n][k][mask]) % mod;
  printf("%d\n", sol);
  return 0;
}
