/**
 * Given a list of names and a dictionary mapping characters to replace,
 * return a new list of names with characters replaced according to the dictionary.
 *
 * @param names A list of strings representing names.
 * @param replaceDict A dictionary mapping characters to replace. The keys are the characters to be replaced,
 * and the values are the characters to replace with.
 * @return A new list of names with characters replaced according to the dictionary.
 */
fun getReplacedNames(names: List<String>, replaceDict: Map<Char, Char>): List<String> {

    val result = mutableListOf<String>()

    for (name in names) {
        var replacedName = ""
        for (char in name) {
            replacedName += replaceDict[char] ?: char
        }
        result.add(replacedName)
    }

    return result
}
/**
 * Given a list of names and a dictionary mapping characters to replace,
 * return a new list of names with characters replaced according to the dictionary.
 *
 * @param names A list of strings representing names.
 * @param replaceDict A dictionary mapping characters to replace. The keys are the characters to be replaced,
 * and the values are the characters to replace with.
 * @return A new list of names with characters replaced according to the dictionary.
 */
fun getReplacedNames(names: List<String>, replaceDict: Map<Char, Char>): List<String> {
/**
 * Given a list of names and a dictionary mapping characters to replace,
 * return a new list of names with characters replaced according to the dictionary.
 *
 * @param names A list of strings representing names.
 * @param replaceDict A dictionary mapping characters to replace. The keys are the characters to be replaced,
 * and the values are the characters to replace with.
 * @return A new list of names with characters replaced according to the dictionary.
 */
fun getReplacedNames(names: List<String>, replaceDict: Map<Char, Char>): List<String> {

    val result = mutableListOf<String>()

    for (name in names) {
        var replacedName = ""
        for (char in name) {
            replacedName += replaceDict[char] ?: char
        }
        result.add(replacedName)
    }

    return result
}