  We establish, in the framework of the theory of nested figures, the
expressions for the gravitational moments $J_{2n}$ of a systems made of ${\cal
L}$ homogeneous layers separated by spheroidal surfaces and in relative
rotational motion. We then discuss how to solve the inverse problem, which
consists in finding the equilibrium configurations (i.e. internal structures)
that reproduce ``exactly'' a set of observables, namely the equatorial radius,
the total mass, the shape and the first gravitational moments. Two coefficients
$J_{2n}$ being constrained per surface, ${\cal L}=1+\frac{n}{2}$ layers ($n$
even) are required to fix $J_2$ to $J_{2n}$.
  As shown, this problem already suffers from a severe degeneracy, inherent in
the fact that two spheroidal surfaces in the system confocal with each other
leave unchanged all the moments. The complexity, which increases with the
number of layers involved, can be reduced by considering the rotation rate of
each layer. Jupiter is used as a test-bed to illustrate the method, concretely
for ${\cal L}=2,3$ and $4$. For this planet, the number of possible internal
structures is infinite for ${\cal L} > 2$. Intermediate layers can have smaller
or larger oblateness, and can rotate slower or faster than the surroundings.
Configurations with large and massive cores are always present. Low-mass cores
(of the order a few Earth masses) are predicted for ${\cal L} \ge 4$. The
results are in good agreement with the numerical solutions obtained from the
Self-Consistent-Field method.
