Given a string s, partition it so every piece is a palindrome. Return all such partitions.
Input: one line, the string s.
Output: one partition per line — its pieces space-separated, in order. Any partition order — printed canonically.
aab
a a b aa b
a
a
Run your code against the sample tests, or Submit to run the full suite.