Implement the functionality to determine if a given string can be rearranged to form a palindrome and, if possible, return the 1-based indices of the characters in such a permutation. The function signature provided must be followed, and the solution should be written in a file named /app/solution.py.
Requirements:
Functionality:
The function find_palindromic_permutation(s: str) -> List[int] should analyze the input string s to determine if it has a palindromic permutation.
If a palindromic permutation exists, return a list of integers representing the 1-based indices of the characters of the input string that form the palindrome.
If no palindromic permutation exists, return a list containing -1.
Input:
A single string s (1 <= |s| <= 1000) consisting of lowercase English letters.
Output:
A list of integers. The integers represent the 1-based indices of the characters that can form a palindromic permutation of the string.
If a palindromic permutation is not possible, return [-1].
Example Cases:
Input: "civic"
Output: [1, 2, 3, 2, 1] or any valid permutation of indices corresponding to a palindrome.
Input: "ivicc"
Output: [1, 2, 3, 2, 1] or any valid permutation of indices corresponding to a palindrome.
Input: "hello"
Output: [-1] (no palindromic permutation possible)
Constraints:
Ensure the solution handles all edge cases, including strings of odd and even lengths, as well as single character strings.
Please implement the function in the specified file.