def minReplacements(original, palindrome, m, n):
    if (m == 0):  
        return n  
    if (n == 0):  
        return m   
    if (original[m] == palindrome[n]):
        return minReplacements(origininal, palindrome, m-1, n-1)

    
    return 1 + min(minReplacements(origininal, palindrome, m, n-1),    
                   minReplacements(origininal, palindrome, m-1, n-1),  
                   minReplacements(origininal, palindrome, m-1, n))    