On-surface synthesis has emerged as an attractive method for the atomically precise synthesis of new molecular nanostructures, being complementary to the widespread approach based on solution chemistry. It has been particularly successful in the synthesis of graphene nanoribbons and nanographenes. In both cases, the target compound is often generated through cyclodehydrogenation reactions, leading to planarization and the formation of hexagonal rings. To improve the flexibility and tunability of molecular units, however, the incorporation of other, nonbenzenoid, subunits is highly desirable. In this letter, we thoroughly analyze sequential cyclodehydrogenation reactions with a customdesigned molecular precursor. We demonstrate the step-by-step formation of hexagonal and pentagonal rings from the nonplanar precursor within fjord and cove regions, respectively. Computer models comprehensively support the experimental observations, revealing that both reactions imply an initial hydrogen abstraction and a final [1,2] hydrogen shift, but the formation of a pentagonal ring proceeds through a radical mechanism.