/**
 * Given a list of journalists and a list of newspapers,
 * this function returns a list containing all the possible
 * combinations of journalists and newspapers.
 *
 * @param n List of journalists.
 * @param m List of newspapers.
 * @return List of pairs containing all the combinations.
 *
 * Example:
 * findArticles(listOf("John", "Mary"), listOf("NY Times", "Washington Post"))
 * Output: [("John", "NY Times"), ("John", "Washington Post"), ("Mary", "NY Times"), ("Mary", "Washington Post")]
 */
fun findArticles(n: List<String>, m: List<String>): List<Pair<String, String>> {

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

    // Nested loop to find all the combinations
    for (journalist in n) {
        for (newspaper in m) {
            combinations.add(Pair(journalist, newspaper))
        }
    }

    return combinations
}
/**
 * Given a list of journalists and a list of newspapers,
 * this function returns a list containing all the possible
 * combinations of journalists and newspapers.
 *
 * @param n List of journalists.
 * @param m List of newspapers.
 * @return List of pairs containing all the combinations.
 *
 * Example:
 * findArticles(listOf("John", "Mary"), listOf("NY Times", "Washington Post"))
 * Output: [("John", "NY Times"), ("John", "Washington Post"), ("Mary", "NY Times"), ("Mary", "Washington Post")]
 */
fun findArticles(n: List<String>, m: List<String>): List<Pair<String, String>> {
/**
 * Given a list of journalists and a list of newspapers,
 * this function returns a list containing all the possible
 * combinations of journalists and newspapers.
 *
 * @param n List of journalists.
 * @param m List of newspapers.
 * @return List of pairs containing all the combinations.
 *
 * Example:
 * findArticles(listOf("John", "Mary"), listOf("NY Times", "Washington Post"))
 * Output: [("John", "NY Times"), ("John", "Washington Post"), ("Mary", "NY Times"), ("Mary", "Washington Post")]
 */
fun findArticles(n: List<String>, m: List<String>): List<Pair<String, String>> {

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

    // Nested loop to find all the combinations
    for (journalist in n) {
        for (newspaper in m) {
            combinations.add(Pair(journalist, newspaper))
        }
    }

    return combinations
}