Mechanism from rotating gears and cogs