Modified input methods in hmm.py.