Consider an M \times N table where each cell contains a non-negative integer. We call a table "pretty" if, for each row , the sum of the numbers in the -th row does not exceed R_i, and for each column , the sum of the numbers in the -th column does not exceed C_j.
You are given a table of size M \times N, in which some cells already contain non-negative numbers. Find a pretty table with the maximum possible sum of elements that matches in all positions where a number is specified in .
The first line contains the integers and (1 \leq M, N \leq 20). The second line contains non-negative integers: R_1, R_2, \ldots, R_M. The third line contains non-negative integers: C_1, C_2, \ldots, C_N. All constraints do not exceed 10^6. The next lines each contain integers, defining . If a cell of the table does not contain a number, is specified at that position in the input.
Print the resulting table as rows of numbers. If there is no solution, print the single number -1.
Example 1