Theory of indirect reciprocity is important in explaining cooperation between humans. Since a partner of a social interaction often changes, an individual should assess his partner by using social information such as reputation and make decisions whether to help him or not. To those who have 'good' social reputation does a player give aid as reciprocation, whereas he has to refuse to help those who have 'bad' reputation. Otherwise benefits of altruism is easily exploited by them. Little has been known, however, about the definition of 'goodness' in reputation. What kind of actions are and should be regarded as good and what kind of actions bad? And what sort of goodness enables sustaining exchange of altruism? We herein challenge this question with an evolutionary perspective. We generalize social reputation as 'Honor-score' (H-score) and examine the conditions under which individuals in a group stably maintain cooperative relationships based on indirect reciprocity. We examine the condition for evolutionarily stable strategies (ESSs) over 4096 possible cases exhaustively. Mathematical analysis reveals that only eight cases called 'leading eight' are crucial to the evolution of indirect reciprocity. Each in the leading eight shares two common characteristics: (i) cooperation with good persons is regarded as good while defection against them is regarded as bad, and (ii) defection against bad persons should be regarded as a good behavior because it works as sanction. Our results give one solution to the definition of goodness from an evolutionary viewpoint. In addition, we believe that the formalism of reputation dynamics gives general insights into the way social information is generated, handled, and transmitted in animal societies.