General analytical solutions of the Bloch equations