Markov chain algorithm with three-word phrases