Viterbi for best observation order