Given an undirected graph. Find the shortest distance between two specified vertices.
The first line contains three positive integers and — the number of vertices in the graph and the numbers of the initial and final vertices. Then, in lines, the adjacency matrix of the graph is given. If the value in the -th element of the -th row is , then there is a directed edge from vertex to vertex in the graph.
Print the minimum distance from the initial vertex to the final one. If the path does not exist, then print .