Rosetta Problems

2番目に短い道

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/1665