How to compare element of list of lists and breakdown one column into multiple columns

Hi dq,

I want to divide below Columns_A and Columns_B into 3 columns.

What approach I am thinking of creating(but no idea what to write in python):

  1. breakdown Columns_A and Columns_B into 3 columns
  2. merge pass_one and pass_two and pass_three
  3. append Columns_C and Columns_D to the longest values of list

Original data(I changed it to list of lists):

Columns_A Columns_B Columns_C Columns_D
1 A X Y
1 A X Y
1 A X Y
2 B X Y
2 B X Y
3 C X Y
3 C X Y
3 C X Y
3 C X Y
11 D Z Q
12 E Z Q
12 E Z Q
12 E Z Q
13 F Z Q
13 F Z Q

What I would like to create:

Columns_A_1 Columns_B_1 Columns_A_2 Columns_B_2 Columns_A_3 Columns_B_3 Columns_C Columns_D
1 A 2 B 3 C X Y
1 A 2 B 3 C X Y
1 A Blacnk Blacnk 3 C X Y
Blacnk Blacnk Blacnk Blacnk 3 C X Y
11 D 12 E 13 F Z Q
Blank Blank 12 E 13 F Z Q
Blank Blank 12 E Blank Blank Z Q

Code that I tried but didn’t work (no error but pass_two & pass_two output blank):

#①breakdown Columns_A and Columns_B into 3 columns
!pip install pandas
import pandas as pd

dic = {'Column_A': ["1","1","1","2","2","3","3","3","3","11","12","12","12","13","13"],
    'Column_B': ['A', 'A', 'A', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'E', 'E', 'E', 'F', 'F'],
    'Column_C': ['X'] * 9 + ['Z'] * 6,
    'Column_D': ['Y'] * 9 + ['Q'] * 6,}
df = pd.DataFrame(dic)
list_data = df.values.tolist()

pass_one = [] #Columns_A_1 and Columns_A_1 
pass_two = [] #Columns_A_2 and Columns_B_2
pass_three = [] #Columns_A_3 and Columns_B_3

for row in list_data:
    Columns_A = row[0]
    Columns_B = row[1]
    Columns_C = row[2]
    Columns_D = row[3]
    list_one = [Columns_A ,Columns_B] #I would like to append these data set
    if Columns_C in Columns_C and Columns_A not in Columns_A:
        pass_two.append(list_one)
        if Columns_C in Columns_C and Columns_A not in Columns_A:
            pass_three.append(list_one)
    else:
        pass_one.append(list_one)

Once Columns_A and Columns_B is separated into 3 list of lists:
I would like to merge pass_one and pass_two and pass_three

At last, append Columns_C and Columns_D to the longest values of list

Does anyone have any ideas how to do this??