Function for symmetrizing A and C