#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int dp[100005][15][1 << 5];
int main() {
  int n, k, m;
  scanf("%d%d%d", &n, &k, &m);
  dp[n + 1][0][0] = 1;
  for (int i = n; i >= 1; i--) {
    for (int j = 0; j <= k; j++) {
      for (int l = 0; l < (1 << (m + 1)); l++) {
        int b = __builtin_popcount(l / 2);
        dp[i][j][l / 2] = (dp[i][j][l / 2] + dp[i + 1][j][l]) % mod;
        dp[i][j + 1][l / 2 + (1 << m)] =
            (dp[i][j + 1][l / 2 + (1 << m)] + dp[i + 1][j][l] * 1ll * (b + 1)) %
            mod;
      }
    }
  }
  int ans = 0;
  for (int l = 0; l < (1 << (m + 1)); l++) ans = (ans + dp[1][k][l]) % mod;
  printf("%d\n", ans);
}
