The function applies the rule of capitalizing the first letter of each input word.
