How are the nitrogenous bases attached to the sugar-phosphate backbone of DNA and RNA?