提供一个英文短文，要求程序将其中某些单词替换为指定单词。
John bought a thesaurus to help him improve his writing skills. He spends hours each day looking up synonyms.
John purchased a thesaurus to enhance his writing ability. He dedicates hours each day researching alternatives. (Replace "improve" with "enhance" and "looking up synonyms" with "researching alternatives".)