Categories within the social hierarchy in feudal Japan