A compound of the formula: stereoisomers thereof and pharmaceutically acceptable salts thereof, wherein: A is an aromatic ring of 5 or 6 members comprising 0-3 heteroatoms of N, S or O; each W is independently - (CH2) - or -C (O) -; L is a bond, CH2, NR12, O or S; S / D is a single or double link, and when it is a double link, R5 and R7 are absent; m is 0 or an integer of 1-4; n is 0 or an integer of 1-4, where when n is greater than 1, each R2 may be different; p is 0 or an integer of 1-2, where when p is 0, m is not 0, and when p is greater than 1, each R6 and each R7 may be different; R1, R4, R5, R6 and R7 are each independently H, halogen, heteroalkyl, alkyl, alkenyl, cycloalkyl, aryl, saturated or unsaturated heterocyclyl, heteroaryl, alkynyl, -CN, -NR13R14, -OR13, -COR13, - CO2R13 , -CONR13R14 -C (>; = NR13) NR14R15, -NR13COR14, -NR13CONR14R15, -NR13CO2R14, -SO2R13, - NR13SO2NR14R15 or -NR13SO2R14, where alkyl, alkenyl, alkynyl, cycloalkyl and heteroaryl unsaturated, heteroaryl or heteroaryl unsaturated substituted with at least one substituent R16, 20 where (R4 and R5), or (R4 and R6), or (R and R7), or (R6 and R6 when p is 2), together with the atoms to which they are linked , can form a ring selected from cycloalkyl, saturated or unsaturated heterocycle, aryl and heteroaryl rings optionally substituted with at least one R16 substituent; R2 is halogen, alkyl -S-alkyl, -CN, -NR13R14, -OR13, -COR13, -CO2R13, -CONR13R14, - C (>; = NR13) NR14R15, -NR13COR14, -NR13CONR14R15, -NR13CO2R14, -SO2R13, - NR13SO2NR14R15 or -NR13SO2R14; R12 is H or lower alkyl; R13, R14 and R15 are each independently H, heteroalkyl, alkyl, alkenyl, alkynyl, cycloalkyl, saturated or unsaturated heterocyclyl, aryl or heteroaryl; where (R13 and R14), and / or (R14 and R15), together with the atom or atoms to which they are linked, can each form a ring selected from cycloalkyl, saturated or unsaturated heterocycle, aryl and heteroaryl rings optionally substituted with an R16 substituent;