def replace_letters(string, encrypted, standard):
    """
    Given a string, replace each encrypted letter with its equivalent
    frequency plaintext letter

    @param string is the string in which to replace characters
    @param encrypted is the encrypted letter alphabet
    @param standard is the standard language letter alphabet
    @returns the new decrypted string
    """

    res = ""
    for letter in string:
        if letter not in standard:
            res += letter
        else:
            encrypted_distribution_index = encrypted.index(letter)
            res += standard[encrypted_distribution_index]
    return res