A compound of formula I: wherein A1 represents -O-, -S- or -CH 2 -; A2 represents -CH 2 - or -O-; A3 represents C 3 -C 8 cycloalkylene; saturated or unsaturated 4 to 8-membered heterocyclodiyl with 1, 2 or 3 heteroatoms selected from nitrogen or oxygen, which group A3 is unsubstituted or substituted by one or more substituents each independently of the others being selected from fluorine, chlorine, bromine or iodine atoms, carboxy, alkyl, alkoxy or mono- or di(C 1 -C 4 alkyl)amino, OH, =O, SH, =S, NH 2, =NH, cyano, NO 2, C 1 -C 4 alkoxycarbonyl, morpholinocarbonyl and hydroxyC 1 -C 4 alkyl groups; A4 represents -C(=O)-; G represents an aryl or heteroaryl group to which further cycloalkane and/or heterocycloalkane rings may be fused, wherein the aryl groups contain one or more rings and from 6 to 14 carbon atoms, the heteroaryl groups contain one or more rings and from 5 to 14 ring atoms containing one or more oxygen, nitrogen or sulfur ring atoms, the cycloalkane groups are saturated or partially unsaturated cyclic groups containing one or more rings and from 3 to 14 carbon atoms and the heterocycloalkane groups are saturated or partially unsaturated cyclic groups containing one or more rings and from 3 to 14 carbon atoms, wherein one or more ring carbon atoms are replaced each independently of the others by an oxygen, nitrogen or sulfur atom and said aryl and heteroaryl groups are unsubstituted or substituted by one or more substituents each independently of the others being selected from fluorine, chlorine, bromine or iodine atoms, carboxy, alkyl, alkoxy or monoor di(C 1 -C 4 alkyl)amino, OH, SH, NH 2, cyano and NO 2 groups and in case of heteroaryl groups furthermore unsubstituted heteroaryl groups and said cycloalkane or heterocycloalkane groups are substituted by one or more substituents each independently of the others being selected from fluorine, chlorine, bromine or iodine atoms, carboxy, alkyl, alkoxy or mono- or di(C 1 -C 4 alkyl)amino, OH, =O, SH, =S, NH 2, =NH cyano and NO 2 groups; X1 represents a nitrogen atom or CR1; R1 represents a hydrogen atom or a halogen atom; m is 0 or 1; n is 1; the -(CH 2) n - group is unsubstituted; and p is 0 or 1; or a pharmaceutically acceptable salt thereof. A1 represents -O-, -S- or -CH 2 -; A2 represents -CH 2 - or -O-; A3 represents C 3 -C 8 cycloalkylene; saturated or unsaturated 4 to 8-membered heterocyclodiyl with 1, 2 or 3 heteroatoms selected from nitrogen or oxygen, which group A3 is unsubstituted or substituted by one or more substituents each independently of the others being selected from fluorine, chlorine, bromine or iodine atoms, carboxy, alkyl, alkoxy or mono- or di(C 1 -C 4 alkyl)amino, OH, =O, SH, =S, NH 2, =NH, cyano, NO 2, C 1 -C 4 alkoxycarbonyl, morpholinocarbonyl and hydroxyC 1 -C 4 alkyl groups; A4 represents -C(=O)-; G represents an aryl or heteroaryl group to which further cycloalkane and/or heterocycloalkane rings may be fused, wherein the aryl groups contain one or more rings and from 6 to 14 carbon atoms, the heteroaryl groups contain one or more rings and from 5 to 14 ring atoms containing one or more oxygen, nitrogen or sulfur ring atoms, the cycloalkane groups are saturated or partially unsaturated cyclic groups containing one or more rings and from 3 to 14 carbon atoms and the heterocycloalkane groups are saturated or partially unsaturated cyclic groups containing one or more rings and from 3 to 14 carbon atoms, wherein one or more ring carbon atoms are replaced each independently of the others by an oxygen, nitrogen or sulfur atom and said aryl and heteroaryl groups are unsubstituted or substituted by one or more substituents each independently of the others being selected from fluorine, chlorine, bromine or iodine atoms, carboxy, alkyl, alkoxy or monoor di(C 1 -C 4 alkyl)amino, OH, SH, NH 2, cyano and NO 2 groups and in case of heteroaryl groups furthermore unsubstituted heteroaryl groups and said cycloalkane or heterocycloalkane groups are substituted by one or more substituents each independently of the others being selected from fluorine, chlorine, bromine or iodine atoms, carboxy, alkyl, alkoxy or mono- or di(C 1 -C 4 alkyl)amino, OH, =O, SH, =S, NH 2, =NH cyano and NO 2 groups; X1 represents a nitrogen atom or CR1; R1 represents a hydrogen atom or a halogen atom; m is 0 or 1; n is 1; the -(CH 2) n - group is unsubstituted; and p is 0 or 1;