Which atom generally obtains a stable configuration by sharing electrons?

phosphorus (P)
magnesium (Mg)
lithium (LI
chlorine (CI)