  The focusing Nonlinear Schr\"odinger (NLS) equation is the simplest universal
model describing the modulation instability (MI) of quasi monochromatic waves
in weakly nonlinear media, and MI is considered the main physical mechanism for
the appearence of anomalous (rogue) waves (AWs) in nature. In this paper we
study, using the finite gap method, the NLS Cauchy problem for generic periodic
initial perturbations of the unstable background solution of NLS (what we call
the Cauchy problem of the AWs), in the case of a finite number $N$ of unstable
modes. We show how the finite gap method adapts to this specific Cauchy problem
through three basic simplifications, allowing one to construct the solution, at
the leading and relevant order, in terms of elementary functions of the initial
data. More precisely, we show that, at the leading order, i) the initial data
generate a partition of the time axis into a sequence of finite intervals, ii)
in each interval $I$ of the partition, only a subset of ${\cal N}(I)\le N$
unstable modes are "visible", and iii) the NLS solution is approximated, for
$t\in I$, by the ${\cal N}(I)$-soliton solution of Akhmediev type, describing
the nonlinear interaction of these visible unstable modes, whose parameters are
expressed in terms of the initial data through elementary functions. This
result explains the relevance of the $m$-soliton solutions of Akhmediev type,
with $m\le N$, in the generic periodic Cauchy problem of the AWs, in the case
of a finite number $N$ of unstable modes.
