Company: Dell,hackathon
Difficulty: medium
Break a Palindrome You are given a string palindromeStr that is a palindrome: it reads the same from left to right and from right to left. Replace exactly one character of it with a lowercase English letter ( a to z ) so that the new string: 1. is not a palindrome; 2. is lexicographically smaller than palindromeStr ; 3. is the lexicographically smallest among all strings that satisfy the first two conditions. Return that new string. If no single replacement satisfies the first two conditions, return IMPOSSIBLE . Function Description Complete the function breakPalindrome : palindromeStr : the original palindrome Return the new string, or IMPOSSIBLE . Input Format A single line containing the string palindromeStr . Output Format Print the new string, or IMPOSSIBLE if there is none. Constraints 1 <= length of palindromeStr <= 1000 palindromeStr is a palindrome. palindromeStr contains only lowercase English letters. Examples Example 1 Input: aaabbaaa Output: aaaabaaa Explanation: The