1. You are given string(str). 2. You can convert the given string to a palindrome by adding some characters in front of it. 3. You have to find the shortest palindromic string formed after performing the above-mentioned transformation.
1 <= length of the string <= 10^4