Note the cogs in the railway. The train literally climbs the mountain with gears that engage the teeth between the tracks.