#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, M = 13, L = 1 << 4, MOD = 1e9 + 7;
int dp[N][M][L];
int cnt(int x) {
  int ret = 0;
  while (x) {
    if (x & 1) ret++;
    x >>= 1;
  }
  return ret;
}
int main() {
  int a, b, c, i, j, k;
  scanf("%d%d%d", &a, &b, &c);
  int lim = 1 << c;
  dp[0][0][0] = 1;
  for (i = 1; i <= a; i++) {
    for (j = 0; j <= b; j++) {
      for (k = 0; k < lim; k++) {
        int nzt = (k << 1) % lim;
        dp[i][j][nzt] = (dp[i][j][nzt] + dp[i - 1][j][k]) % MOD;
        if (j)
          dp[i][j][nzt | 1] = (0ll + dp[i][j][nzt | 1] +
                               1ll * dp[i - 1][j - 1][k] * (1 + cnt(k))) %
                              MOD;
      }
    }
  }
  int ans = 0;
  for (i = 0; i < lim; i++) ans = (ans + dp[a][b][i]) % MOD;
  printf("%d", ans);
  return 0;
}
