One way clutch.
The blue input shaft rotates two directions but the transmission is possible only for one. The pink shaft moves longitudinally when the input reverses because of axial component of gear force in the blue gear drive. The orange rings represent thrust bearings.
The mechanism should be used only for low speed case because of gear collision.