/**
 * This function takes in a list of roads and returns the coordinates where a criminal is found.
 * Each road is represented by a list of coordinates, and there can be multiple roads.
 *
 * @param roads A list of roads where a criminal might be hiding
 * @return The coordinates where the criminal is found
 *
 * Hint: A criminal is found at the intersection of two roads.
 */
fun findCriminal(roads: List<List<Pair<Int, Int>>>) : Pair<Int, Int>? {

    for (i in roads.indices) {
        for (j in i + 1 until roads.size) {
            for (coord1 in roads[i]) {
                for (coord2 in roads[j]) {
                    if (coord1 == coord2) {
                        return coord1
                    }
                }
            }
        }
    }
    return null
}
/**
 * This function takes in a list of roads and returns the coordinates where a criminal is found.
 * Each road is represented by a list of coordinates, and there can be multiple roads.
 *
 * @param roads A list of roads where a criminal might be hiding
 * @return The coordinates where the criminal is found
 *
 * Hint: A criminal is found at the intersection of two roads.
 */
fun findCriminal(roads: List<List<Pair<Int, Int>>>) : Pair<Int, Int>? {
/**
 * This function takes in a list of roads and returns the coordinates where a criminal is found.
 * Each road is represented by a list of coordinates, and there can be multiple roads.
 *
 * @param roads A list of roads where a criminal might be hiding
 * @return The coordinates where the criminal is found
 *
 * Hint: A criminal is found at the intersection of two roads.
 */
fun findCriminal(roads: List<List<Pair<Int, Int>>>) : Pair<Int, Int>? {

    for (i in roads.indices) {
        for (j in i + 1 until roads.size) {
            for (coord1 in roads[i]) {
                for (coord2 in roads[j]) {
                    if (coord1 == coord2) {
                        return coord1
                    }
                }
            }
        }
    }
    return null
}