Numbering neighboring panels in n-gons mesh

Hello Guys

made the definition in the grasshopper by the numbering of the panels of the network with an arbitrary number and angles from 3 to 6 for example
my definition works well on 3 coal grids, but already on 4 coal and ridiculous grids gives errors

can anyone have the same problem, can you please tell me how to create a definition for the numbering of neighboring packages?

I think Google Translate is letting you down on a few words here.

I wopuld recommend using a mesh topology plugin such as Sandbox to give you the indices of neighboring mesh faces and edges.