How to find the shortest path from the origin to the first destination then from the first destination to the second destination? Here is the sample input:
3 2 A