Recovering the alignment

As wel as the overall cost of the shortest path, we might want to recover the alignment, so we need a way to do that too.