The invention relates to novel compounds of formula (I), wherein one Z is N and the other is -C-R 2 , and their use in medicine, particularly in treating and /or preventing infections caused by a bacterium, fungus or virus or in treating and/or preventing cancer. Additionally, the invention relates to a process for obtaining the compounds of the invention.