Exact exchange-correlation potentials from ground-state electron densities