/**
 * This function takes a grid of cities and a specific city name, and tries to find the position of
 * the city in the grid. It uses nested loops to iterate through each row and column of the grid,
 * and breaks out of the loops when the city is found. If the city is not found, it returns (-1, -1).
 *
 * @param grid A list of lists representing the grid of cities
 * @param city A string representing the name of the city to find
 * @return A Pair(row, column) representing the position of the city in the grid, or (-1, -1) if not found
 */
fun findCityInGrid(grid: List<List<String>>, city: String): Pair<Int, Int> {

    val rows = grid.size
    val cols = grid[0].size

    for (row in 0 until rows) {
        for (col in 0 until cols) {
            if (grid[row][col] == city) {
                return Pair(row, col)
            }
        }
    }

    return Pair(-1, -1)
}
/**
 * This function takes a grid of cities and a specific city name, and tries to find the position of
 * the city in the grid. It uses nested loops to iterate through each row and column of the grid,
 * and breaks out of the loops when the city is found. If the city is not found, it returns (-1, -1).
 *
 * @param grid A list of lists representing the grid of cities
 * @param city A string representing the name of the city to find
 * @return A Pair(row, column) representing the position of the city in the grid, or (-1, -1) if not found
 */
fun findCityInGrid(grid: List<List<String>>, city: String): Pair<Int, Int> {
/**
 * This function takes a grid of cities and a specific city name, and tries to find the position of
 * the city in the grid. It uses nested loops to iterate through each row and column of the grid,
 * and breaks out of the loops when the city is found. If the city is not found, it returns (-1, -1).
 *
 * @param grid A list of lists representing the grid of cities
 * @param city A string representing the name of the city to find
 * @return A Pair(row, column) representing the position of the city in the grid, or (-1, -1) if not found
 */
fun findCityInGrid(grid: List<List<String>>, city: String): Pair<Int, Int> {

    val rows = grid.size
    val cols = grid[0].size

    for (row in 0 until rows) {
        for (col in 0 until cols) {
            if (grid[row][col] == city) {
                return Pair(row, col)
            }
        }
    }

    return Pair(-1, -1)
}