Set of coordinates in multiple domains

Hi all,

I have a set of numbers. I need to check in which domain they belong.
The picture below are the numbers grouped on a “root” level.

image

I need to compare them to multiple domains in this list:
image

However the part where I’m struggling is that the points in level {0},{1},… should only be checked to all the domains in level {0},{1},… of the other list, and ignore the other branches. So for example all of the 19 points on level {0} should be checked to the 2 domains in level {0}.
The amount of domains is not fixed it can be 1,2,3,4,5,… however the amount of branches in both lists are always the same

i tried playing around with grafting but that didn’t give the correct result.

Kind Regards,
Peter