So the problem states that if the given word in a sentence begins and ends with the same character I remove that character and keep on doing that until they are not the same