Which of the following qualifications had to be met for a person to become a civil servant in the Ming government