Consider an array A of length N and an array B of length M. An entanglement of these two arrays is a matrix C of size N×M such that for all 0≤i≤N−1 and 0≤j≤M−1, at least one of the following conditions holds: C\[i]\[j]=A\[i] or C\[i]\[j]=B\[j].
You are given a matrix C of size N×M and a number K. Your task is to count the number of pairs of arrays (A,B) such that:
Print the number of such pairs modulo 109+7.
The first line of input contains three integers N, M and K (1≤N,M≤300, 1≤K≤N×M).
Each of the following N lines contains M integers separated by spaces, the j-th number on the i-th of these lines is C\[i−1]\[j−1].
Print a single line containing a single integer: the number of pairs of arrays (A,B) modulo 109+7.