CF20C Dijkstra?
Description
You are given a weighted undirected graph. The vertices are enumerated from 1 to $ n $ . Your task is to find the shortest path between the vertex $ 1 $ and the vertex $ n $ .
Input Format
The first line contains two integers $ n $ and $ m $ ( $ 2
Output Format
Write the only integer -1 in case of no path. Write the shortest path in opposite case. If there are many solutions, print any of them.