A compound of formula: wherein: V is N or C-R 2 W is N or C-R 8; X is N, CH or C(CH 3); Y is N or C-R 5; Z is N or C-R 15; Q is N or CH; R 1 is C 1-4 alkyl or deuterated C 1-4 alkyl; R 2, when present, is H, OH, C 1-4 alkyl, halo, -CF 3, -NH 2, -OC 1-4 alkyl, -NHC H, -NHC C 1-4 alkyl,-N(CH 3)C C 1-4 alkyl, -NHC NH 2, -NHC C 1-4 alkyleneNH 2, -N(CH 3)C NH 2, -N(CH 3)C C 1-4 alkyleneNH 2, -NHC 2-4 alkyleneOCH 3, -N(CH 3)C 2-4 alkyleneOCH 3, -OC 2-4 alkyleneOCH 3, -OC 2-4 alkyleneOH or R 2 is a group selected from -G-CH 2 CH(R 3)(R 4), -G-CH(R 3)(R 4) and -G-R 3 in which G is NH, N(CH 3), O, C NH or NHC; R 3 is phenyl, pyridinyl, C 3-7 cycloalkyl or a heterocycle optionally substituted by =O; and R 4 is H or C 1-4 alkyl; R 5, when present, is H, C 1-4 alkyl, halo, -CF 3, CN, OH, -OC 1-4 alkyl, -CH 2 NH 2, -OCF 3, -SO 2 CH 3,-C NHC 1-4 alkyl or -CO 2 H; R 6 is -NR 11 R 12 or a group D is CH or N; E is N, O, CH or SO 2; R 7, when present, is H, OH, C 1-4 alkyl, -NH 2, -SO 2 C 1-4 alkyl, -SO 2 phenyl, -SO 2 benzyl, -SO 2 N(CH 3) 2,-NHSO 2 CH 3, -C C 1-4 alkyl, -C phenyl; R 8, when present, is H, C 1-4 alkyl, halo, -CF 3, CN, OH, -OC 1-4 alkyl, -OC 2-4 alkyleneOC 1-4 alkyl, -OCF 3,-OC 1-4 alkyleneF, -OC 1-4 alkyleneCHF 2, -OC 2-4 alkyleneOH, -Ophenyl, -OC 1-4 alkylenephenyl, -NHC 3-7 cycloalkyl, -NHC 1-4 alkyleneC 3-7 cycloalkyl, -OC 3-7 cycloalkyl, -OC 1-4 alkyleneC 3-7 cycloalkyl, -NHC 4-6 heterocycle -NHC 1-4 alkyleneC 4-6 heterocycle, -OC 4-6 heterocycle or -OC 1-4 alkyleneC 4-6 heterocycle wherein the C 3-7 cycloalkyl or the C 4-6 heterocycle are each optionally substituted by one or two substituents independently selected from halo, OH, oxo, C 1-4 alkyl and -NH 2; or R 8 and R 2 together with the carbon atoms to which they are attached, form a heterocycle optionally substituted by oxo; R 9 is H, C 1-4 alkyl, -C NH 2, -CO 2 CH 3, -CF 3, halo, OH, -OC 1-4 alkyl, -CH 2 OH, -C NHCH 3,-C NH(CH 3) 2, -CH 2 OC 1-4 alkyl or -CH 2 OCH 2 C 3-7 cycloalkyl; R 10 is H, C 1-4 alkyl, -C NH 2, -CO 2 CH 3, -CF 3, halo, OH, -OC 1-4 alkyl or oxo; R 11 is H, C 1-4 alkyl or SO 2 CH 3; R 12 is H, C 1-4 alkyl, C 2-4 alkyleneNHR 13, SO 2 CH 3, a heterocycle or a heterocycle comprising SO 2; R 13 is H or SO 2 CH 3; R 14 is H or C 1-4 alkyl; R 15 is H, C 1-4 alkyl or NHC C 1-4 alkyl; R 16 is H or C 1-4 alkyl; and n and m are each an integer independently selected from 0, 1 and 2; subject to proviso that no more than 2 of V, W, X, Y and Z are N; or a pharmaceutically acceptable salt thereof. V is N or C-R 2 W is N or C-R 8; X is N, CH or C(CH 3); Y is N or C-R 5; Z is N or C-R 15; Q is N or CH; R 1 is C 1-4 alkyl or deuterated C 1-4 alkyl; R 2, when present, is H, OH, C 1-4 alkyl, halo, -CF 3, -NH 2, -OC 1-4 alkyl, -NHC H, -NHC C 1-4 alkyl,-N(CH 3)C C 1-4 alkyl, -NHC NH 2, -NHC C 1-4 alkyleneNH 2, -N(CH 3)C NH 2, -N(CH 3)C C 1-4 alkyleneNH 2, -NHC 2-4 alkyleneOCH 3, -N(CH 3)C 2-4 alkyleneOCH 3, -OC 2-4 alkyleneOCH 3, -OC 2-4 alkyleneOH or R 2 is a group selected from -G-CH 2 CH(R 3)(R 4), -G-CH(R 3)(R 4) and -G-R 3 in which G is NH, N(CH 3), O, C NH or NHC; R 3 is phenyl, pyridinyl, C 3-7 cycloalkyl or a heterocycle optionally substituted by =O; and R 4 is H or C 1-4 alkyl; G is NH, N(CH 3), O, C NH or NHC; R 3 is phenyl, pyridinyl, C 3-7 cycloalkyl or a heterocycle optionally substituted by =O; and R 4 is H or C 1-4 alkyl; R 5, when present, is H, C 1-4 alkyl, halo, -CF 3, CN, OH, -OC 1-4 alkyl, -CH 2 NH 2, -OCF 3, -SO 2 CH 3,-C NHC 1-4 alkyl or -CO 2 H; R 6 is -NR 11 R 12 or a group D is CH or N; E is N, O, CH or SO 2; R 7, when present, is H, OH, C 1-4 alkyl, -NH 2, -SO 2 C 1-4 alkyl, -SO 2 phenyl, -SO 2 benzyl, -SO 2 N(CH 3) 2,-NHSO 2 CH 3, -C C 1-4 alkyl, -C phenyl; R 8, when present, is H, C 1-4 alkyl, halo, -CF 3, CN, OH, -OC 1-4 alkyl, -OC 2-4 alkyleneOC 1-4 alkyl, -OCF 3,-OC 1-4 alkyleneF, -OC 1-4 alkyleneCHF 2, -OC 2-4 alkyleneOH, -Ophenyl, -OC 1-4 alkylenephenyl, -NHC 3-7 cycloalkyl, -NHC 1-4 alkyleneC 3-7 cycloalkyl, -OC 3-7 cycloalkyl, -OC 1-4 alkyleneC 3-7 cycloalkyl, -NHC 4-6 heterocycle -NHC 1-4 alkyleneC 4-6 heterocycle, -OC 4-6 heterocycle or -OC 1-4 alkyleneC 4-6 heterocycle wherein the C 3-7 cycloalkyl or the C 4-6 heterocycle are each optionally substituted by one or two substituents independently selected from halo, OH, oxo, C 1-4 alkyl and -NH 2; or R 8 and R 2 together with the carbon atoms to which they are attached, form a heterocycle optionally substituted by oxo; R 9 is H, C 1-4 alkyl, -C NH 2, -CO 2 CH 3, -CF 3, halo, OH, -OC 1-4 alkyl, -CH 2 OH, -C NHCH 3,-C NH(CH 3) 2, -CH 2 OC 1-4 alkyl or -CH 2 OCH 2 C 3-7 cycloalkyl; R 10 is H, C 1-4 alkyl, -C NH 2, -CO 2 CH 3, -CF 3, halo, OH, -OC 1-4 alkyl or oxo; R 11 is H, C 1-4 alkyl or SO 2 CH 3; R 12 is H, C 1-4 alkyl, C 2-4 alkyleneNHR 13, SO 2 CH 3, a heterocycle or a heterocycle comprising SO 2; R 13 is H or SO 2 CH 3; R 14 is H or C 1-4 alkyl; R 15 is H, C 1-4 alkyl or NHC C 1-4 alkyl; R 16 is H or C 1-4 alkyl; and n and m are each an integer independently selected from 0, 1 and 2; subject to proviso that no more than 2 of V, W, X, Y and Z are N; or a pharmaceutically acceptable salt thereof.