Unique Length-3 Palindromic Subsequences

Implement solve for Unique Length-3 Palindromic Subsequences. Return the required output for the provided arguments.

Given a string s, return the number of unique palindromes of length 3 that can be formed as subsequences of s.

Examples
Input: "aabca"
Output: 3
Hints

Unique Length-3 Palindromic Subsequences

Implement `solve` for **Unique Length-3 Palindromic Subsequences**. Return the required output for the provided arguments.