Surface-confined reactions represent a powerful approach for the precise synthesis of low-dimensional organic materials. A complete understanding of the pathways of surface reactions would enable the rational synthesis of a wide range of molecules and polymers. Here, we report different reaction pathways of tetrathienylbenzene (T1TB) and its extended congener tetrakis(dithienyl)benzene (T2TB) on Cu(111), investigated using scanning tunneling microscopy, X-ray photoelectron spectroscopy, and density functional theory calculations. Both T1TB and T2TB undergo desulfurization when deposited on Cu(111) at room temperature. Deposition of T1TB at 453 K yields pentacene through desulfurization, hydrogen transfer, and a cascade of intramolecular cyclization. In contrast, for T2TB the intramolecular cyclization stops at anthracene and the following intermolecular C-C coupling produces a conjugated ladder polymer. We show that tandem desulfurization/C-C coupling provides a versatile approach for growing carbon-based nanostructures on metal surfaces.