/**
 * This function takes a list of strings as input and returns the intersection of all the strings.
 * The intersection is the set of characters that are present in all the strings.
 *
 * @param strings a list of strings
 * @return intersection a string representing the intersection of all the strings
 */
fun intersectionOfStrings(strings: List<String>): String {

    // Initialize the intersection string with the first string
    var intersection = strings[0]

    // Iterate through each character of the first string
    for (char in intersection) {
        // Check if the character is present in all other strings
        for (string in strings.subList(1, strings.size)) {
            if (char !in string) {
                // Remove the character from the intersection if it is not present in any of the other strings
                intersection = intersection.replace(char.toString(), "")
                break
            }
        }
    }

    return intersection
}
/**
 * This function takes a list of strings as input and returns the intersection of all the strings.
 * The intersection is the set of characters that are present in all the strings.
 *
 * @param strings a list of strings
 * @return intersection a string representing the intersection of all the strings
 */
fun intersectionOfStrings(strings: List<String>): String {
/**
 * This function takes a list of strings as input and returns the intersection of all the strings.
 * The intersection is the set of characters that are present in all the strings.
 *
 * @param strings a list of strings
 * @return intersection a string representing the intersection of all the strings
 */
fun intersectionOfStrings(strings: List<String>): String {

    // Initialize the intersection string with the first string
    var intersection = strings[0]

    // Iterate through each character of the first string
    for (char in intersection) {
        // Check if the character is present in all other strings
        for (string in strings.subList(1, strings.size)) {
            if (char !in string) {
                // Remove the character from the intersection if it is not present in any of the other strings
                intersection = intersection.replace(char.toString(), "")
                break
            }
        }
    }

    return intersection
}