The social structure of China has an extensive history which begins from the feudal society of Imperial China to the contemporary era. There was a Chinese nobility, beginning with the Zhou dynasty. However, after the Song dynasty, the powerful government offices were not hereditary. Instead they were selected through the imperial examination system, of written examinations based on Confucian thought, thereby undermining the power of the hereditary aristocracy.