Nearest Neighbouring City
A number of cities are arranged on a simple two by two grid, which is like an ordinary Cartesian plane. Each city is located at an integral (x, y) coordinate intersection. City names and locations are given in the form of a three-part list: [NAME, X, Y] and are provided by the method to solve the problem named findNearestCities, as shown in the pseudocode below. Determine the name of the nearest city that shares either an x or a y coordinate with the queried city. If no other cities share a x or y coordinate, return "NONE". If two cities have the same distance to the queried city (i.e., if candidate cities are at an equal distance to your name [i.e., "your_city" is the closest choice. The distance is the Manhattan distance, the absolute difference in x plus the absolute difference in y.
1Example 1

The three cities at (3, 3), (2, 2), (1, 1) are named c1, c2, and c3 respectively.
For the query "c1", the nearest city sharing an x or y coordinate is "c2" at (2, 2) with a Manhattan distance of 2.
For the query "c2", the nearest city sharing an x or y coordinate is "c3" at (1, 1) with a Manhattan distance of 2.
For the query "c3", the nearest city sharing an x or y coordinate is "c2" at (2, 2) with a Manhattan distance of 2.
2Example 2

3Example 3

4Example 4

Constraints
Limits and guarantees your solution can rely on.