Given a matrix of size N \times N filled with non-negative integers. The distance between two elements A_{ij} and A_{pq} is defined as |i-p|+|j-q|. Each zero element in the matrix must be replaced by the nearest nonzero element. If there are two or more nearest nonzero elements at the same distance, the zero should remain unchanged.
The first line contains the number (1 \leq N \leq 200, 0 \leq A_{ij} \leq 1000000). Then lines follow, each containing integers separated by spaces, representing the matrix.
Print lines, each containing integers separated by spaces— the modified matrix.
Beispiel 1