Input is the matrix A of N by N non-negative integers.

A distance between two elements A_{i j} and
A_{p q} is defined as |i − p| + |j − q|.

Your program must replace each zero element in the matrix with the nearest non-zero one.
If there are two or more nearest non-zeroes, the zero must be left in place.

Input file format

Input file contains the number N followed by N^{2} integers, representing the matrix
row-by-row.

Output file format

Output file must contain N^{2} integers, representing the modified matrix
row-by-row.