The development of structural thinking about social categories