Solve Interesting Trip

You are given a directed acyclic graph with letters on each vertex. You have to find lexicographically minimal path between two vertexes. Solving code challenges on HackerRank is one of the best ways to prepare for programming interviews.