Solutions of the Bethe ansatz equations associated to the XXX model of a simple Lie algebra [inline-graphic not available: see fulltext] come in families called the populations. We prove that a population is isomorphic to the flag variety of the Langlands dual Lie algebra [inline-graphic not available: see fulltext] 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.