Replace words with different synonyms and print each combination in a text file

But I don’t really understand where to put the words in the program that generates n options for the towers.