A fab lab is a small open workshop where you can make almost anything yourself with computer controlled tools such as a laser cutter or a 3D printer. One fab lab recently got a CNC milling machine. The machine removes material from the surface of a workpiece with different tools, and a computer program drives it.
Suppose workpieces of different shapes are sent through the same milling program one after another. To keep things simple, a workpiece is a two dimensional shape without holes: it is X columns wide, and each column has one surface height.
A milling program consists of several steps. Each step states how deep the cutter head goes in each column. If the i-th value of a step is si, then during that step the cutter head for column i sits at height Y−si, and whatever rises above Y−si in that column is cut away. The cut depth is measured from the height Y of the milling area, not from the current surface of the workpiece.
Apply all steps in order and report the surface heights that remain on each workpiece.
The first line contains the number of workpieces W and the number of steps S in the milling program (1≤W,S≤104).
The second line contains the width X of the workpieces and the maximal possible height Y of a workpiece (1≤X,Y≤100).
The next W lines describe one workpiece each. Every line holds X non-negative integers, where the i-th value is the surface height of column i. Each height is between 0 and Y.
The next S lines describe one milling step each, in order. Every line holds X non-negative integers si with 0≤si≤Y, giving the amount cut off in that column relative to the height Y of the milling area.
For each workpiece, print one line with the X remaining surface heights, separated by single spaces and in the same order as in the input.

Figure: the second workpiece of the first example. The initial workpiece is followed by the milling of each column. The value in the milling program sets the vertical position of the cutter head.