Generate random words based on Markov chains