Construction of the pyrazolo[1,5-a][6,1]benzodiazonine and pyrazolo[1,5-a][7,1]benzodiazecine skeletons