  Solutions of the Bethe ansatz equations associated to the XXX model of a
simple Lie algebra come in families called the populations. We prove that a
population is isomorphic to the flag variety of the Langlands dual Lie algebra.
The proof is based on the correspondence between the solutions of the Bethe
ansatz equations and special difference operators which we call the discrete
Miura opers. The notion of a discrete Miura oper is one of the main results of
the paper.
  For a discrete Miura oper D, associated to a point of a population, we show
that all solutions of the difference equation DY=0 are rational functions, and
the solutions can be written explicitly in terms of points composing the
population.
