Compounds of formula IV, where T3 is N, may be prepared by reacting a compound of formula II with a compound of formula X, where T3 is N and X is hydrogen and if T2 is N then P is a protecting group or if T2 is CH then P is hydrogen, in an analogous method as described in (a) above.