Choice of neighbor order in nearest-neighbor classification