The "Warring states period," which lasted from about 500 to the 200s b.c.e., ushered in considerable social change and intellectual ferment in China. Perhaps the most important ideology to emerge from this period was Confucianism. Appalled by the centuries-long unrest that plagued the region, Confucius advocated a philosophy that sought to establish order through social stratification. Each class would be clearly defined, and would have a particular ethos, or code, by which they had to abide. Some others turned to different solutions. At the center of things would be a ruler, who governed for the benefit of all. Legalism, for example, advocated a system of absolute rule and harsh punishments aimed at ending disorder, which was caused by the basic evil of humanity. For Legalists, an individual could gain power by whatever means necessary, and then use force to maintain it. Daoists, on the other hand, looked for less pragmatic, worldly solutions, rather arguing that a society and its government ought to be run according to principles of order found in the cosmos and in nature. In the short run, the Qin dynasty enforced order by abiding by the principles of Legalism. After the fall of the Qin, the Han Dynasty (25-220s c.e.) came to power. The Han, particularly Han Wudi, embraced the tenets of Confucianism, placing a great emphasis on order and especially court ritual, as well as marriage and tribute relationships with outsiders, as a means to restore order.