Start with a failing economy. Throw in a team of inexperienced politicians, people in fact who had spent their careers deliberately avoiding official politics. Add a population with the highest possible expectations. And, as a wild card, introduce an international community that was not offering very much in the way of financial assistance.
This was the situation in Poland in September 1989 when Tadeusz Mazowiecki became the first non-Communist prime minister in the region in more than 40 years. Considering the odds against Poland at that time, it’s remarkable that the country survived and, eventually, prospered.