We study the Liouville theory on a Riemann surface of genus g by means
of their associated Drinfeld-Sokolov linear systems. We discuss the c
ohomological properties of the monodromies of these systems. We identi
fy the space of solutions of the equations of motion which are single-
valued and local and explicitly represent them in terms of K-richever-
Novikov oscillators. Then we discuss the operator structure of the qua
ntum theory, in particular we determine the quantum exchange algebras
and find the quantum conditions for univalence and locality. We show t
hat we can extend the above discussion to sl(n) Toda theories.