How did the social classes in ancient Greece rank and differ from each other?