FIELD: chemistry.SUBSTANCE: invention relates to organic chemistry, specifically a heterocyclic compound of formula (1), where G1, G2 and G3 are CH or a nitrogen atom, where at most 2 of G1, G2 and G3 represent a nitrogen atom; R1 is a chlorine atom, a bromine atom, C1-3alkyl group, a trifluoromethyl group, a C3-6cycloalkyl group, a phenyl group or a C1alkoxy group; R2 is -COOR5 (where R5 represents a hydrogen atom) or -C(O)N(R6)SO2R7 (where R6 represents a hydrogen atom and R7 is C1alkyl group); R3 is hydrogen atom; and R4 is an optionally substituted naphthyl group; an optionally substituted fluorenyl group; optionally substituted with 1 to 2 indolyl groups; a substituted indazolyl group; a substituted tetrahydroquinolyl group; a substituted isoquinolyl group; a substituted dihydroquinazolinyl group; or a substituted dihydrobenzothiazolyl group; an optionally substituted tetrahydrocarbazolyl group; provided that (1) if R4 is an optionally substituted condensed naphthyl group, G3 represents a nitrogen atom; and (2) if G1 is CH, G2 is CH, G3 is CH, R1 is a chlorine atom, C1-3alkyl group or a trifluoromethyl group, R2 is -COOH, and R3 represents a hydrogen atom, then R4 represents a group represented by general formulae (2-1)–(2-4), (where X1aa, X1ba, X1ca are the same and are CR9a (where R9a represents a hydrogen atom); X1e represents a nitrogen atom; X1da is a CR9a (where R9a represents a hydrogen atom) or a nitrogen atom; X2 is CR10 (where R10 represents a hydrogen atom, C1alkyl group substituted with 1 hydroxyl group) or a nitrogen atom; X3 is a CR11 (where R11 represents a hydrogen atom, a phenyl-C1alkyl group, a benzoyl group) or a nitrogen atom; X4 represents CH2, CH2-CH2 or C=O; X5 is CH2 or C=O; X6 represents CH2, CH2-CH2, C=O, NR12 (where R12 represents a hydrogen atom, C1alkyl group), an oxygen atom or a sulphur atom; and R8a is C4alkyl group, C3cycloalkyl group, C3-6cycloalkyl-C1alkyl group, an optionally substituted phenyl group, optionally substituted w