[Kotlin] Clean & Short Solution
\nclass Solution {\n    fun breakPalindrome(palindrome: String): String {\n        return if (palindrome.length == 1) {\n            "" // It\'s impassible to b
```\nclass Solution {\n    fun breakPalindrome(palindrome: String): String {\n        return if (palindrome.length == 1) {\n            "" // It\'s impassible to break palindrome when length == 1\n        } else {\n            palindrome.indexOfFirst { it != \'a\' }\n                .takeIf {\n                    it != -1 && it < palindrome.length / 2\n                }?.let { index ->\n                    // If there exist a none \'a\' character in the first half, change that character to \'a\'\n                    StringBuilder(palindrome).also { it[index] = \'a\' }.toString()\n                } ?: run { \n                    // Else change the last character to \'b\'\n                    StringBuilder(palindrome).also { it[it.lastIndex] = \'b\' }.toString()\n                }\n        }\n    }\n}\n```
['Kotlin']