The Hongwu emperor from 1373 to 1384 staffed his bureaus with officials gathered through recommendations only. After that the scholar-officials who populated the many ranks of bureaucracy were recruited through a rigorous examination system that was initially established by the Sui dynasty (581–618). Theoretically the system of exams allowed anyone to join the ranks of imperial officials (although it was frowned upon for merchants to join); in reality the time and funding needed to support the study in preparation for the exam generally limited participants to those already coming from the landholding class. However, the government did exact provincial quotas while drafting officials. This was an effort to curb monopolization of power by landholding gentry who came from the most prosperous regions, where education was the most advanced. The expansion of the printing industry since Song times enhanced the spread of knowledge and number of potential exam candidates throughout the provinces. For young schoolchildren there were printed multiplication tables and primers for elementary vocabulary; for adult examination candidates there were mass-produced, inexpensive volumes of Confucian classics and successful examination answers.