Sizer Hierarchy processing

Hi,

I have a list that contains sizers objects.

sizerList = [hbox1, hbox2, vbox1, hbox3, vbox2, vbox3]

The hierarchy of this sizers is like this:

hbox1
hbox2
vbox1
hbox3
vbox2
vbox3

How do I process this list so that I can get only root level sizers.
The correct list would be like this:

rootSizers = [hbox1,hbox2,hbox3]

Cheers