A complete directed weighted graph is given by its adjacency matrix. Construct the matrix of shortest distances between all pairs of its vertices. It is guaranteed that the graph contains no negative-weight cycles.
The first line contains the number of vertices n~(1 \le n \le 100) in the graph. Each of the next lines contains integers describing the adjacency matrix of the graph: the -th number in the -th row is the weight of the edge from vertex to vertex . The absolute value of each number does not exceed . The diagonal elements of the matrix are always zero.
Print lines with integers each — the matrix of shortest distances between all pairs of vertices. The -th number in the -th row should be equal to the length of the shortest path from vertex to vertex .
Example 1