Block Stacking

No attempts yetTime limit1sMemory limit32 MB

Problem

Yeonggeul plays with blocks. He owns KK kinds of blocks. Every block has height 1, and the widths are 1 through KK. Blocks of the same width always have the same color, but two blocks of different widths may still have the same color. Every kind is available without limit. For example, if K=3K=3 and the three blocks have three different colors, he can use as many of the following three blocks as he wants.

Yeonggeul stacks these blocks on a floor block of width WW. A tall stack is awkward to play with, so he keeps the height at most HH. The picture below shows an example with W=6W=6.

A block must line up exactly with the cells, and no empty space may be left under a placed block. The left picture follows the rules and the right picture does not.

In the left picture every block follows the rules and the height is 4. In the right picture the leftmost red block does not line up with the cells. The middle of the blue block has empty space under it, and the rightmost red block also has empty space under it. The right picture is therefore not a correct stacking.

Count the stackings that follow the rules. Two stackings that show the same color in every cell when seen from the front count as one. Stacking nothing at all counts as one case.

Input

The first line has three integers separated by spaces: the number of block kinds KK (1K3001 \le K \le 300), the width of the floor block WW, and the largest allowed height HH (1W,H3001 \le W, H \le 300).

The second line has KK integers. The ii-th number CiC_i (1CiK1 \le C_i \le K) is the color of the block of width ii.

Output

Print the number of stackings that follow the rules, modulo 1,000,000,007.