Composite Data Structure Python