Catalytic arylation of carbon-carbon double bond followed by nitrogen- or oxygen-cyclization