Given a directed weighted graph, find the pair of vertices such that the shortest distance from one to the other is maximal among all pairs of vertices.
The first line contains the number of vertices (1 \le n \le 100). The next lines each contain numbers and represent the weight matrix of the graph. A value of means there is no edge between the corresponding vertices; any non-negative number represents the weight of an edge. All elements on the main diagonal are always zero.
Print the required maximum shortest distance.

Example 1