Computing Sufficient and Necessary Conditions in CTL: A Forgetting Approach