Preparation of tricyclic nitrogen heterocycles via tandem four-component condensation/intramolecular Diels-Alder reaction