The directed weighted graph is given. Find the shortest distance from one vertex to another.
The first line contains three integers and , where is the number of graph vertices, is the initial vertex, and is the final vertex. Each of the next lines contains integers — the matrix of weights of the graph, where means the lack of edge between the vertices, and any nonnegative integer — the weight of the existing edge. The main diagonal of the matrix contains zeroes.
Print the shortest distance from to or if the path does not exist.