Cog railways, also known as rack-and-pinion railways or cogwheel railways, are ingenious systems designed to allow trains to climb steep gradients that would be impossible for conventional railways. The core principle of a cog railway is the use of a toothed rack rail and a cog wheel. The rack rail is installed between the regular running rails, and the locomotive is equipped with one or more cog wheels (pinions) that mesh with this rack. This engagement allows the train to climb the track, much like a gear system.