Example of Viterbi  algorithm