Ground states of a ternary system including attractive and repulsive Coulomb-type interactions