A compound having the general formula (IIa) or (IIb) wherein p is 2 or 3; each linker K is independently C 1-3 alkylene which is optionally substituted by one or more C 1-4 alkyl groups; the heterocyclic ring B is optionally substituted by one or more substituents selected from C 1-4 alkyl, C 1-4 alkoxy, mono- and di-C 1-4 alkyl amino, C 3-7 cycloalkyl amino, and 5- or 6- membered saturated heterocyclyl, or two substituents may be joined to form a saturated, unsaturated or aromatic 5- to 7-membered ring which is fused with the heterocyclic ring B; R 1 is selected from -H, -halogen, -C 1-4 alkyl, NH 2, -NH-C 1-4 alkyl, -C 1-4 alkylene-NH 2, -C 1-4 alkylene-NH-C 1-4 alkyl, -aryl, -aryl-R 3, -C 1-4 alkylene-aryl, -C 1-4 alkylene-aryl-R 3, -heteroaryl, heteroaryl-R 3, -NH-C 1-4 alkylene-aryl, -NH-C 1-4 alkylene-aryl-R 3, -OH and -O-C 1-4 alkyl; and R 3 is C 1-4 alkyl, halogen, OH or O-C 1-4 alkyl; R 2 is -H, -C 1-4 alkyl, -aryl or a group of the formula (IIIa) or (IIIb) wherein in the formula (IIIa) and (IIIb): the heterocyclic ring B is optionally substituted by one or more substituents selected from C 1-4 alkyl, C 1-4 alkoxy, mono- and di-C 1-4 alkyl amino, C 3-7 cycloalkyl amino, and 5- or 6-membered saturated heterocyclyl, or two substituents may be joined to form a saturated, unsaturated or aromatic 5- to 7-membered ring which is fused with the heterocyclic ring B; each linker K is independently C 1-3 alkylene which is optionally substituted by one or more C 1-4 alkyl groups; R 1 is selected from -H, -halogen, -C 1-4 alkyl, -NH 2, -NH-C 1-4 alkyl, -C 1-4 alkylene-NH 2, -C 1-4 alkylene-NH-C 1-4 alkyl, -aryl, -aryl-R 3, -C 1-4 alkylene-aryl, -C 1-4 alkylene-aryl-R 3, -heteroaryl, -heteroaryl-R 3, -NH-C 1-4 alkylene-aryl, -NH-C 1-4 alkylene-aryl-R 3, -OH and -O-C 1-4 alkyl; q is 0 or 1; and r is 0 or 1. p is 2 or 3; each linker K is independently C 1-3 alkylene which is optionally substituted by one or more C 1-4 alkyl groups; the heterocyclic ring B is optionally substituted by one or more substituents selected from C 1-4 alkyl, C 1-4 alkoxy, mono- and di-C 1-4 alkyl amino, C 3-7 cycloalkyl amino, and 5- or 6- membered saturated heterocyclyl, or two substituents may be joined to form a saturated, unsaturated or aromatic 5- to 7-membered ring which is fused with the heterocyclic ring B; R 1 is selected from -H, -halogen, -C 1-4 alkyl, NH 2, -NH-C 1-4 alkyl, -C 1-4 alkylene-NH 2, -C 1-4 alkylene-NH-C 1-4 alkyl, -aryl, -aryl-R 3, -C 1-4 alkylene-aryl, -C 1-4 alkylene-aryl-R 3, -heteroaryl, heteroaryl-R 3, -NH-C 1-4 alkylene-aryl, -NH-C 1-4 alkylene-aryl-R 3, -OH and -O-C 1-4 alkyl; and R 3 is C 1-4 alkyl, halogen, OH or O-C 1-4 alkyl; R 2 is -H, -C 1-4 alkyl, -aryl or a group of the formula (IIIa) or (IIIb) wherein in the formula (IIIa) and (IIIb): the heterocyclic ring B is optionally substituted by one or more substituents selected from C 1-4 alkyl, C 1-4 alkoxy, mono- and di-C 1-4 alkyl amino, C 3-7 cycloalkyl amino, and 5- or 6-membered saturated heterocyclyl, or two substituents may be joined to form a saturated, unsaturated or aromatic 5- to 7-membered ring which is fused with the heterocyclic ring B; each linker K is independently C 1-3 alkylene which is optionally substituted by one or more C 1-4 alkyl groups; R 1 is selected from -H, -halogen, -C 1-4 alkyl, -NH 2, -NH-C 1-4 alkyl, -C 1-4 alkylene-NH 2, -C 1-4 alkylene-NH-C 1-4 alkyl, -aryl, -aryl-R 3, -C 1-4 alkylene-aryl, -C 1-4 alkylene-aryl-R 3, -heteroaryl, -heteroaryl-R 3, -NH-C 1-4 alkylene-aryl, -NH-C 1-4 alkylene-aryl-R 3, -OH and -O-C 1-4 alkyl; the heterocyclic ring B is optionally substituted by one or more substituents selected from C 1-4 alkyl, C 1-4 alkoxy, mono- and di-C 1-4 alkyl amino, C 3-7 cycloalkyl amino, and 5- or 6-membered saturated heterocyclyl, or two substituents may be joined to form a saturated, unsaturated or aromatic 5- to 7-membered ring which is fused with the heterocyclic ring B; each linker K is independently C 1-3 alkylene which is optionally substituted by one or more C 1-4 alkyl groups; R 1 is selected from -H, -halogen, -C 1-4 alkyl, -NH 2, -NH-C 1-4 alkyl, -C 1-4 alkylene-NH 2, -C 1-4 alkylene-NH-C 1-4 alkyl, -aryl, -aryl-R 3, -C 1-4 alkylene-aryl, -C 1-4 alkylene-aryl-R 3, -heteroaryl, -heteroaryl-R 3, -NH-C 1-4 alkylene-aryl, -NH-C 1-4 alkylene-aryl-R 3, -OH and -O-C 1-4 alkyl; q is 0 or 1; and r is 0 or 1.