Suppose that we have a world with an infinite number of cubes, each of which are 1x1x1 in size and have integral coordinates, e.g. (1, 2, 3)
Given that C is a cube at (XC, YC, ZC) and that P is a vertex of that cube with coordinates (XP, YP, ZP), what are the coordinates of the other 7 cubes that have the vertex P?
XC - XP = 0 or -1 and YC - YP = 0 or -1 and ZC - ZP = 0 or -1
Let's look at the cube with vertices $\{(0,0,0),(0,0,1),(0,1,0),(0,1,1),(1,0,0), (1,0,1), (1,1,0), (1,1,1) \}$. If I understand your comment, you would index this cube at $(0,0,0)$. The $7$ other cubes that share this vertex are indexed at $(-1,0,0)$, $(0,-1,0)$, $(0,-1,-1)$, $(0,0,-1)$, $(-1,0,-1)$, $(0,-1,-1)$, and $(-1,-1,-1)$.
Now given any vertex $P = (x,y,z)$, there are $8$ cubes sharing this vertex and these are indexed at $(x,y,z)$, $(x-1,y,z)$, $(x,y-1,z)$, $(x,y-1,z-1)$, $(x,y,z-1)$, $(x-1,y,z-1)$, $(x,y-1,z-1)$, and $(x-1,y-1,z-1)$ respectively. If we remove the index of the cube we started with ( namely $(X_C, Y_C, Z_C)$ in your notation ), the remaining indices yield the desired answer.