working prob 2 - MLE viterbi