Regiodivergent heterocyclization: a strategy for the synthesis of substituted pyrroles and furans using α-formyl ketene dithioacetals as common precursors.