/**
 * This function takes two strings s1 and s2 and returns the intersection of the two strings in a new string.
 *
 * @param s1 A string containing characters.
 * @param s2 Another string containing characters.
 * @return A string that contains only the characters that are common in both s1 and s2.
 *
 * Example:
 * intersection("hello", "world") returns "lo"
 */
fun intersection(s1: String, s2: String): String {

    // Initialize an empty string to store the intersection
    var result = ""

    // Loop through each character in s1
    for (char in s1) {
        // Check if the character is present in s2
        if (char in s2 && char !in result) {
            // Append the character to the result string if it has not been added already
            result += char
        }
    }

    return result
}
/**
 * This function takes two strings s1 and s2 and returns the intersection of the two strings in a new string.
 *
 * @param s1 A string containing characters.
 * @param s2 Another string containing characters.
 * @return A string that contains only the characters that are common in both s1 and s2.
 *
 * Example:
 * intersection("hello", "world") returns "lo"
 */
fun intersection(s1: String, s2: String): String {
/**
 * This function takes two strings s1 and s2 and returns the intersection of the two strings in a new string.
 *
 * @param s1 A string containing characters.
 * @param s2 Another string containing characters.
 * @return A string that contains only the characters that are common in both s1 and s2.
 *
 * Example:
 * intersection("hello", "world") returns "lo"
 */
fun intersection(s1: String, s2: String): String {

    // Initialize an empty string to store the intersection
    var result = ""

    // Loop through each character in s1
    for (char in s1) {
        // Check if the character is present in s2
        if (char in s2 && char !in result) {
            // Append the character to the result string if it has not been added already
            result += char
        }
    }

    return result
}