A compound of formula (I) ** ** Formula wherein Z is CH or N G is a group of formula ** ** Formula wherein A is a phenyl ring or a heterocyclic ring of 5 to 12 members, and R1 is H, C1-7 alkyl, C3-7 cycloalkyl, C3-7 cycloalkyl C1-7 alkyl, C1-7 alkoxy, C1-7 alkylcarbonyl, amino, hydroxy, hydroxy C1-7 alkyl, C1-7 alkylamino C1-7 alkyl, phenyl C1-7 alkoxy, -NHC (O) -R 21, -R 12-C (O) -R13, -SO2-R14 or -E-R6, and R2 is H, halogen, C1-7 alkyl or oxo B is a carbocyclic ring or 5-12 membered heterocyclic R3 is H, halogen, C1-7 alkyl, C1-7 alkoxy, cyano or an optionally substituted heterocyclic ring of 5-6 members R4 is H, halogen, C1-7 alkyl or oxo M is hydroxyl, C1-7 alkyl or -NHR 5 R5 is H, -C (O) R7, -SO2R8, -C (O) -D-R9 or optionally substituted heterocyclic ring of 5-6 members R6 is an optionally substituted heterocyclic 5-6 membered ring R7 is C1-7 alkyl, C2-7 alkenyl, C3-7 cycloalkyl, C1-7alcoxi, C1-7 alkoxy C1-7 alkyl, carboxy C1-7 alkyl, C1-7 alkoxycarbonyl C1-7 alkyl, C1-7 alkylamino C1-7 alkyl, -NH-R10 or -NH-X1-R11 R8 is C1-7 alkyl, C2-7 alkenyl, C3-7 cycloalkyl, hydroxy C1-7 alkyl, -NR18R19, -NH-X2-R20, phenyl or a heterocyclic ring optionally substituted 5-6 membered R9 is phenyl or an optionally substituted heterocyclic ring of 5-6 members R10 is C1-7 alkyl or C3-7 cycloalkyl R11 is phenyl or an optionally substituted heterocyclic ring 5 5-6 members R12 and R21 are C1-7 alkyl R13 is C1-7 alkoxy, amino or hydroxy R14 is C1-7 alkyl or C3-7 cycloalkyl R18 and R19 are independently H, C1-7 alkyl or C3-7 cycloalkyl R20 is phenyl or an optionally substituted heterocyclic ring of 5-6 members E is a bond or C1-7 alkyl D is a bond or C1-7 alkyl X1 and X2 are independently a bond or C1-7 alkyl and pharmaceutically acceptable salts thereof.Un compuesto de fórmula (I)**Fórmula** en donde Z es CH o N G es un grupo de fórmula**Fórmula** en donde A es un anillo fenilo o un anillo heterocíclico de 5-12 miembros, y R1 es H, C1-7 alquilo, C3-7 cicloalquilo, C3-7 cicloalquilo