Finished Viterbi output formatting