Joining one list item with the next one

Hi, what I have here is a list of lines divided in branches. Those branches group up the lines that converge in the same centre (inside all those ovals)

I need to create closed polygons with each pair of adjacent lines. To do this, I need to join each item with the next one on the list (including the last one with the first one), always respecting the separation between branches (right now all of them have four items but the number is variable).

Simply imputing a series of numbers to the “List item” component (with the +1 output) doesn’t work. I thought about anemone loops but I don’t have a great handle on them yet. Any ideas on how to best approach the problem?

Can you upload a Simplified version of the file? Ideally something which only has the lines?