Function to return the lexicographically smallest palindrome that can be made from the given string after replacing the required characters
function makePalindrome ( str ) { var i = 0 , j = str . length - 1 ; while ( i <= j ) {