Solution to Palindrome Partitioning