markovchain.py