Synthesis of ladder-type pi-conjugated heteroacenes via palladium-catalyzed double N-arylation and intramolecular O-arylation.