A compound of formula I, wherein: any two of A, B and D are N and the other one is CH; Z is selected from the group consisting of -CH 2 -, -C - and -S 2 -; X is halogen or N, with the proviso that when X is halogen, R 1 and R 2 in formula I are absent; R 1 and R 2 are each independently selected from the group consisting of H, linear or branched alkyl having 1 to 6 carbon atoms, C1-C6 linear or branched heteroalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S; or R 1 and R 2, together with N to which they are attached, form a 5- to 8-membered heterocycloalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S; R 3 and R 4 are each independently selected from the group consisting of H, aryl, heteroaryl, fused aryl or fused heteroaryl containing 5 to 10 atoms; wherein said aryl, heteroaryl, fused aryl or fused heteroaryl is optionally and independently mono-, di-or poly-substituted with a substituent selected from the group consisting of halogen, cyano, trifluoromethyl, hydroxy and nitro; R 5 is selected from the group consisting of linear or branched alkyl having 1 to 6 carbon atoms, C1-C6 linear or branched heteroalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S, cycloalkyl containing 4 to 8 carbon atoms, 5- to 8-membered heterocycloalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S; m and n are each independently 0, 1 or 2; or a racemate or a stereoisomer, or a pharmaceutically acceptable salt or solvate thereof. any two of A, B and D are N and the other one is CH; Z is selected from the group consisting of -CH 2 -, -C - and -S 2 -; X is halogen or N, with the proviso that when X is halogen, R 1 and R 2 in formula I are absent; R 1 and R 2 are each independently selected from the group consisting of H, linear or branched alkyl having 1 to 6 carbon atoms, C1-C6 linear or branched heteroalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S; or R 1 and R 2, together with N to which they are attached, form a 5- to 8-membered heterocycloalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S; R 3 and R 4 are each independently selected from the group consisting of H, aryl, heteroaryl, fused aryl or fused heteroaryl containing 5 to 10 atoms; wherein said aryl, heteroaryl, fused aryl or fused heteroaryl is optionally and independently mono-, di-or poly-substituted with a substituent selected from the group consisting of halogen, cyano, trifluoromethyl, hydroxy and nitro; R 5 is selected from the group consisting of linear or branched alkyl having 1 to 6 carbon atoms, C1-C6 linear or branched heteroalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S, cycloalkyl containing 4 to 8 carbon atoms, 5- to 8-membered heterocycloalkyl containing 1 to 2 heteroatoms independently selected from the group consisting of O, N and S; m and n are each independently 0, 1 or 2; or a racemate or a stereoisomer, or a pharmaceutically acceptable salt or solvate thereof.