/**
 * You are given two lists of genes, A and B, where each gene is represented as a tuple of its name, sequence, and function.
 * Complete the function to find the common genes between the two lists and return them as a new list in the format of tuples.
 */
fun findCommonGenes(A: List<Triple<String, String, String>>, B: List<Triple<String, String, String>>): List<Triple<String, String, String>> {

    val commonGenes = mutableListOf<Triple<String, String, String>>()

    for (geneA in A) {
        for (geneB in B) {
            if (geneA.first == geneB.first && geneA.second == geneB.second) { // If the names and sequences of genes match
                commonGenes.add(geneA) // Add the common gene to the list
            }
        }
    }

    return commonGenes
}
/**
 * You are given two lists of genes, A and B, where each gene is represented as a tuple of its name, sequence, and function.
 * Complete the function to find the common genes between the two lists and return them as a new list in the format of tuples.
 */
fun findCommonGenes(A: List<Triple<String, String, String>>, B: List<Triple<String, String, String>>): List<Triple<String, String, String>> {
/**
 * You are given two lists of genes, A and B, where each gene is represented as a tuple of its name, sequence, and function.
 * Complete the function to find the common genes between the two lists and return them as a new list in the format of tuples.
 */
fun findCommonGenes(A: List<Triple<String, String, String>>, B: List<Triple<String, String, String>>): List<Triple<String, String, String>> {

    val commonGenes = mutableListOf<Triple<String, String, String>>()

    for (geneA in A) {
        for (geneB in B) {
            if (geneA.first == geneB.first && geneA.second == geneB.second) { // If the names and sequences of genes match
                commonGenes.add(geneA) // Add the common gene to the list
            }
        }
    }

    return commonGenes
}