def genValidSurr(grid,surr,validChars,visitedSet):
    validSet = []
    for point in surr:
        indexI = point[0]
        indexJ = point[1]
        gridPoint = grid[indexI][indexJ]
        if((gridPoint in validChars) and not(point in visitedSet)):
            validSet.append(point)
    return validSet