Python - Bruteforce
\nclass Solution:\n    def maxProduct(self, s: str) -> int:\n        subs = []\n        n = len(s)\n        def dfs(curr, ind, inds):\n            if ind == n:\
```\nclass Solution:\n    def maxProduct(self, s: str) -> int:\n        subs = []\n        n = len(s)\n        def dfs(curr, ind, inds):\n            if ind == n:\n                if curr == curr[::-1]:\n                    subs.append((curr, inds))\n                return\n            dfs(curr+s[ind], ind+1, inds|{ind})\n            dfs(curr, ind+1, inds)\n        \n        dfs(\'\', 0, set())\n        \n        res = 0\n        n = len(subs)\n        for i in range(n):\n            s1, i1 = subs[i]\n            for j in range(i+1, n):\n                s2, i2 = subs[j]\n                if len(i1 & i2) == 0:\n                    res = max(res, len(s1)*len(s2))\n        return res\n```
['Python', 'Python3']