Cute table
Consider the table size M×N, in which cells are non-negative integers. We say that the table is nice, if for all i the sum of the numbers of its i-th row is less than R_i and for all j the sum of the numbers of j-th column is not more than C_j.
You set the table Z size M×N, in some cells which are already non-negative integers. Find a nice table with a maximum amount of elements such that it coincides with Z on those cells, which are in the Z number.
Input
The first line contains the number of M and N (1 ≤ M, N ≤ 20). The next line contains M non-negative integers - R_1, R_2, ..., R_M. The next line contains N non-negative integers C_1, C_2, ..., C_N. All restrictions shall not exceed 10^6. The following M lines contains N integers that define Z. If at some point in the table is missing a number, at this point in the input file is number -1.
Output
Bring in the output table found - M rows of N numbers. If there is no solution, output only the number -1.