Ex5 16

$\def\abs#1{|#1|}\def\i{\mathbf {i}}\def\ket#1{|{#1}\rangle}\def\bra#1{\langle{#1}|}\def\braket#1#2{\langle{#1}|{#2}\rangle}\def\tr{\mathord{\mbox{tr}}}\mathbf{Exercise\ 5.16}$

Design a circuit that permutes the values of three qubits in that it sends $\ket\psi\ket\phi\ket\eta$ to $\ket\phi\ket\eta\ket\psi$ for all single-qubit states $\ket\psi$, $\ket\phi$, and $\ket\eta$.