The order of basicity is I>III>II>IV The lone pair of electrons on N is more readily available for protonation in I and III than in II. III contains an oxygen atom which has −I effect due to which it is less basic than I. In compound IV lone pair of es on N-atom is contributed towards the aromatic sextet formation and hence it is not at all available for protonation.