📌 Python3 simple naive approach
\nclass Solution:\n    def nearestValidPoint(self, x: int, y: int, points: List[List[int]]) -> int:\n        result = None\n        maximumDistance = float("inf
```\nclass Solution:\n    def nearestValidPoint(self, x: int, y: int, points: List[List[int]]) -> int:\n        result = None\n        maximumDistance = float("inf")\n        \n        for index,point in enumerate(points):\n            a,b = point\n            distance = abs(x-a) + abs(y-b)\n            if distance < maximumDistance and (x == a or y == b):\n                maximumDistance = distance\n                result = index\n        \n        return result if result != None else -1\n```
['Python3']