A palindrome reads the same from left to right and from right to left, like "noon" or "a".
You are given a string s. Cut it into pieces so that every piece is a palindrome. Return all the ways to do this. Return the answer in any order.
Examples
Example 1:
Input: s = "noon"
Output: [["n","o","o","n"],["n","oo","n"],["noon"]]
Explanation: You can cut it into single letters, or keep "oo" together, or keep the whole word.
Example 2:
Input: s = "xyz"
Output: [["x","y","z"]]
Explanation: No two letters match, so only single letters work.
Example 3:
Input: s = "c"
Output: [["c"]]
Explanation: One letter is already a palindrome.