**Input**: A 3-qubit system which is guaranteed to be in either the $\ket{++-}$ state, or the $\ket{---}$ state.

**Output**: 
- 0 if the qubit is in the $\ket{++-}$ state,
- 1 if the qubit is in the $\ket{---}$ state.

The state of the qubits at the end of the operation should be the same as the initial state.
