Maroon came up with the following problem:
* * *
Snuke has an integer sequence $a$ of length $N$. Initially, $a_i=0$ for every $i$ ($1 \leq i \leq N$).
Snuke will repeat the following two operations any number of times in any order:
* Operation $1$: Replace $a_i$ with $a_i+x$, where $i$ ($1 \leq i \leq N$) and $x$ ($x=1$ or $x=-1$) are integers of his choice. The cost of doing this operation once is $1$.
* Operation $2$: Replace $a_i$ with $a_i+x$ for every $i$ ($l \leq i \leq r$), where $l$, $r$ ($1 \leq l \leq r \leq N$) and $x$ ($x=1$ or $x=-1$) are integers of his choice. The cost of doing this operation once is $C$.
You are given an integer sequence $A$ of length $N$. Snuke wants to make $a_i=A_i$ for every $i$. Find the minimum total cost needed to achieve his objective.
* * *
However, during the preparation of this problem, too many unexpected solutions were found, so Maroon changed the problem into the following:
* * *
Snuke has $N$ integer sequences $B_1,B_2,\cdots,B_N$ and integers $C$ and $K$. The length of every sequence $B_i$ ($1 \leq i \leq N$) is $K$.
Now, he wants to make an integer sequence $A$ of length $N$ and find the answer to the problem above. The value of $A_i$ will be chosen from $B_{i,1},B_{i,2},\cdots,B_{i,K}$. Here, even if there are duplicated values in $B_{i,1},B_{i,2},\cdots,B_{i,K}$, we still distinguish those values. That is, there are $K^N$ ways to make $A$.
Find the sum of the answers to the problem above over all the ways to make $A$, modulo $(10^9+7)$.
* * *
Solve this problem.
## Constraints
* $1 \leq N \leq 50$
* $1 \leq C \leq N$
* $1 \leq K \leq 50$
* $1 \leq B_{i,j} \leq 10^9$
* All values in input are integers.
## Input
Input is given from Standard Input in the following format:
$N$ $C$ $K$
$B_{1,1}$ $B_{1,2}$ $\cdots$ $B_{1,K}$
$B_{2,1}$ $B_{2,2}$ $\cdots$ $B_{2,K}$
$\vdots$
$B_{N,1}$ $B_{N,2}$ $\cdots$ $B_{N,K}$
[samples]