A novel tandem transetherification—intramolecular hetero Diels–Alder reactions for construction of fused heterocycles