Road Construction

Count the ways to place exactly M undirected edges among N houses, each edge joining houses at distance at most K, so that every house has even degree, modulo 1e9+7.

Hard8Dynamic programmingCombinatoricsGraphBit manipulationNo attempts yetTime limit2sMemory limit512 MB

Problem

Yeongseon lives in a city with NN houses, numbered 1 to NN. The city has no roads at the moment. Yeongseon wants to build exactly MM two-way roads between houses while keeping both rules below.

  • Two different houses AA and BB can be joined by a road only when 0<ABK0 < |A - B| \le K. Two houses joined by a road are adjacent. Several roads can join the same pair of houses.
  • Every house must be adjacent to an even number of roads.

Two plans count as different when some pair of houses is joined by a different number of roads. Given NN, MM and KK, write a program that counts the plans for building the roads.

Input

The first line contains NN, MM and KK. (1N301 \le N \le 30, 0M300 \le M \le 30, 1K81 \le K \le 8)

Output

Print the number of plans for building the roads, modulo 1,000,000,007, on the first line.

Hint

The picture below shows one way to build the roads in the first example.

The picture below shows one way to build the roads in the second example.