How did the social classes of ancient Mesopotamia influence societal structure and hierarchies?