Implement HMM.java and Viterbi.java