Five- and six-membered heterocycles from nucleophilic addition to nitrile oxides