The function takes a string input and modifies it by replacing certain words with different words.
