Solved palindrome partitioning problem.