The synthesis of carbon-based nanomaterials has experienced an enormous advance in the last 15 years, in part motivated by the advent of On-surface Synthesis (OSS).1 This young field, based on the synthesis of carbon-based nanostructures directly on surfaces thanks to their unique catalytic properties, has allowed the formation of otherwise unattainable extended pi-conjugated systems, like atomically precise graphene nanoribbons,which turned out to be an excellent workbench to explore new physico-chemical properties at the atomic and molecular level.2 Once it was shown the feasibility to use this bottom-up approach to induce organic chemical reactions between tailored precursor monomers, the field evolved toward adding increasing complexity to the final products, either by modifying the dimensionality, edge structure and shape or by including heteroatoms or defects. All these approaches resulted in new intriguing properties as modified band structures or topological states. Of particular recent interest is the effect of non-benzenoid rings in the emergence of pi-magnetism, so far mainly focused on pentagonal rings.3 However, if we want to increase the versatility of the field and explore new possible functionalities associated to the presence of non-benzenoid rings in the nanostructures, it is mandatory to study their stability on surfaces.In this talk, we will discuss the thermal stability of different high-membered non-benzenoid rings, specifically heptagons and octogons, when included into graphene-based nanostructures, paying special attention to the reaction mechanisms involved. References (1) Gourdon, A. On-Surface Covalent Coupling in Ultrahigh Vacuum. Angew. Chem. Int. Ed. 2008, 47 (37), 6950–6953. https://doi.org/10.1002/anie.200802229.(2) Clair, S.; de Oteyza, D. G. Controlling a Chemical Coupling Reaction on a Surface: Tools and Strategies for On-Surface Synthesis. Chem. Rev. 2019, 119 (7), 4717–4776. https://doi.org/10.1021/acs.chemrev.8b00601.(3) Oteyza, D. G. de; Frederiksen, T. Carbon-Based Nanostructures as a Versatile Platform for Tunable π-Magnetism. J. Phys. Condens. Matter 2022, 34 (44), 443001. https://doi.org/10.1088/1361-648X/ac8a7f.