Completely X-symmetric S-matrices corresponding to theta functions