Confucian or Legalist scholars in ancient China—perhaps as far back as the late Zhou dynasty (c. 1046–256 BC)—categorized all socio-economic groups into four broad and hierarchical occupations (in descending order): the ' (scholars, or gentry), the ' (peasant farmers), the ' (artisans and craftsmen), and the ' (merchants). Wealthy landholders and officials possessed the resources to better prepare their sons for the civil service examinations, yet they were often rivaled in their power and wealth by merchants of the Song period. Merchants frequently colluded commercially and politically with officials, despite the fact that scholar-officials looked down on mercantile vocations as less respectable pursuits than farming or craftsmanship. The military also provided a means for advancement in Song society for those who became officers, even though soldiers were not highly respected members of society. Although certain domestic and familial duties were expected of women in Song society, they nonetheless enjoyed a wide range of social and legal rights in an otherwise patriarchal society. Women's improved rights to property came gradually with the increasing value of dowries offered by brides' families.