/**
 * This function checks if the given social workers are assigned to any of the given students.
 *
 * @param socialWorkers a list of strings representing social workers
 * @param students a list of strings representing students
 * @return a list of tuples containing the assigned student and social worker pairs
 *
 * Example:
 * checkStudents(listOf("SW1", "SW2", "SW3"), listOf("Student1", "Student2", "Student3"))
 * Output: [("Student1", "SW1"), ("Student2", "SW2"), ("Student3", "SW3")]
 */
fun checkStudents(socialWorkers: List<String>, students: List<String>): List<Pair<String, String>> {

    val assignedPairs = mutableListOf<Pair<String, String>>()

    for (socialWorker in socialWorkers) {
        for (student in students) {
            if (socialWorker in student) {
                assignedPairs.add(Pair(student, socialWorker))
            }
        }
    }

    return assignedPairs
}
/**
 * This function checks if the given social workers are assigned to any of the given students.
 *
 * @param socialWorkers a list of strings representing social workers
 * @param students a list of strings representing students
 * @return a list of tuples containing the assigned student and social worker pairs
 *
 * Example:
 * checkStudents(listOf("SW1", "SW2", "SW3"), listOf("Student1", "Student2", "Student3"))
 * Output: [("Student1", "SW1"), ("Student2", "SW2"), ("Student3", "SW3")]
 */
fun checkStudents(socialWorkers: List<String>, students: List<String>): List<Pair<String, String>> {
/**
 * This function checks if the given social workers are assigned to any of the given students.
 *
 * @param socialWorkers a list of strings representing social workers
 * @param students a list of strings representing students
 * @return a list of tuples containing the assigned student and social worker pairs
 *
 * Example:
 * checkStudents(listOf("SW1", "SW2", "SW3"), listOf("Student1", "Student2", "Student3"))
 * Output: [("Student1", "SW1"), ("Student2", "SW2"), ("Student3", "SW3")]
 */
fun checkStudents(socialWorkers: List<String>, students: List<String>): List<Pair<String, String>> {

    val assignedPairs = mutableListOf<Pair<String, String>>()

    for (socialWorker in socialWorkers) {
        for (student in students) {
            if (socialWorker in student) {
                assignedPairs.add(Pair(student, socialWorker))
            }
        }
    }

    return assignedPairs
}