Rearrange list according to an existing one

Hi everyone, newby here.

I’m in a weird situation here.
Actually I’ve a list A, and a list B.
A and B are composed by the same amount of items (36), but A doesn’t have any branch, and B is composed by 12 branches, each one composed by 3 element.
Is there any way I can turn the structure of A the same as B? and is there a way to make this process parametrically adjustable? Thanks in advance.

Partition List with ‘S’ (Size) input set to 3.


Thanks so much!
The solution has been always under my nose lol