#include <bits/stdc++.h>
const int mod = 1e9 + 7;
int n, m, k, ans, dp[100100][20][20];
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 sta = 0; sta < (1 << m); sta++) {
        (dp[i + 1][j][sta >> 1] += dp[i][j][sta]) %= mod;
        int res = 1ll * dp[i][j][sta] * (1 + __builtin_popcount(sta)) % mod;
        (dp[i + 1][j + 1][(sta >> 1) | (1 << m - 1)] += res) %= mod;
      }
  ans = 0;
  for (int i = 0; i < (1 << m); i++) (ans += dp[n][k][i]) %= mod;
  printf("%d\n", ans);
}
