The Taihō Code provided for Confucian-model penal provisions (light rather than harsh punishments) and Chinese-style central administration through the , which was devoted to Shinto and court rituals, and the , with its eight ministries (for central administration, ceremonies, civil affairs, the imperial household, justice, military affairs, people's affairs, and the treasury). Although the Chinese-style civil service examination system was not adopted, was founded for training future bureaucrats based on the Confucian classics. Tradition circumvented the system, however, as aristocratic birth continued to be the main qualification for higher position, and titles were soon hereditary again. The Taihō Code did not address the selection of the sovereign. Several empresses reigned from the fifth to the eighth centuries, but after 770 succession was restricted to males, usually from father to son, although sometimes from ruler to brother or uncle.