This is good! You have the structure down, but we're looking for one more thing, which is the generation of the text and seeing how you handle a trigram that runs out of words in its dictionary value list.