Workgin Markov chain generator