Hello medequ,
There is an even simpler solution with path mapper :
If you want to group paths 3 by 3, you just have to divide the path number by 3.
Since path mapper rounds the value, {0}/3=0 becomes {0}, {1}/3=0.33 becomes {0} but {2}/3=0.66 becomes {1}. That is why I added 2 to the path number to make sure {0}, {1} and {2} would be in the same group.
I hope this helps !