The examination system offered a path for ethnic Han to become officials