Vladimir Fock Flat connections and triples of flags Abstract: We are going to explain that the moduli space of flat $G$-connections on Riemann surfaces for simple Lie group $G$ and its versions can be constructed by a so-called amalgamation procedure out of much simpler space $F$ - configuration space of triples of flags with some additional data. Namely each moduli space of flat connections can be represented as a power of $F$ quotiented by a power of the Cartan subgroup. This construction respects Poisson structure and quantisation. The presentation is not unique, but in order to pass from one presentation to another as well as to describe the mapping class group action it is sufficient to study configurations of four flags. A particular case of such moduli spaces is the Lie group $G$ as well as the dual group $G^*$. In this case the construction gives explicitly the standart Poisson-Lie structure on them.