[palindrome] Added the relation between P and S