For a non real root $z$ of the equation $z^4+z^2+1=0$, the value of $\left(z+\frac{1}{z}\right)^3+\left(z^2+\frac{1}{z^2}\right)^2+\left(z^3+\frac{1}{z^3}\right)^3$