In the late fifteenth century, King Shō Shin established a formal hierarchy of religious officials that corresponded closely to the hierarchy of male government officials.