Hi everyone,
Hope you guys are having a wonderful day!
Here is the question I have:

I have a data set that contain tow columns: the first column has duplicate values and the second has unique values.
Below is the desired output I want:

So basically, out system doesn't allow duplicate values in column A. So what I want is to separate the records into different groups(tables, files, whatever). In this case, the maximum count of duplicate records are 4. So we need to separate the records in 4 groups.
The output could be like this as well

So I guess the steps are: identify the maximum count of duplicate values - create groups based on the result and then separate those values in different group. I want it to be dynamic so it can detect how many groups needs to be generated.
I want to find a way to separate those records automatically.
Any idea will be appreciated.