Choose two nonempty palindromic subsequences of s that use disjoint sets of character indices. Each subsequence preserves the original index order; the two choices may interleave, but they cannot share an index. A palindrome reads the same forward and backward. Return the largest possible product of the two subsequence lengths. You may leave characters unused.
Example 1:
Input: s = "abab"
Output: 4Explanation: Choose the a characters at indices 0 and 2 and the b characters at indices 1 and 3. Both subsequences are palindromes of length 2, so their product is 4.
Example 2:
Input: s = "abcdef"
Output: 1Explanation: Every character is different, so any palindromic subsequence has length 1. Two distinct indices give product 1.
Example 3:
Input: s = "aaaaaa"
Output: 9Explanation: Assign the first three characters to one subsequence and the last three to the other. Both read aaa, giving product 3 × 3 = 9. No split of six available characters can have a larger product.
Constraints:
2 <= s.length <= 12scontains only lowercase English letters.