Ukraine held democratic, transparent, free and fair presidential elections that can serve as an example not only to most former Soviet states but to the United States as well. That’s the good news. The bad news is that by voting in Volodymyr Zelenskiy Ukraine has entered the Groundhog Day, repeating the pattern that brought Viktor Yanukovych to power in 2010 and then saw him kicked out four years later. There were bad problems with the Petro Poroshenko government – corruption, economic difficulties, endless war and many others – but the remedy chosen by the Ukrainian electorate has a real possibility of being worse and of exacerbating significantly the country’s problems over the longer term.

In my Soviet childhood there was a popular saying: gambling is not the real problem, trying to win back your losses is.

The populism that swept Ukraine on April 21 has by now become familiar. It reflects genuine gripes and grievances of the majority of the world population. Life-changing social and economic processes under way around the world – globalization, technological revolution, population growth and climate change – create massive challenges across the boards. They are driving masses of refugees to rich countries but also filling ordinary people even in prosperous developed countries with dread. We are overwhelmed and disoriented; we are losing our sense of security as our social status diminishes and economic standing deteriorates.

To add insult to injury, we are also resentful of the fact that corporations and their beneficiaries, along with various super-rich, are prospering on an unprecedented scale thanks to the very processes that are causing so much damage to the rest of us. It seems to be a zero-sum game, and most of us seem to be emerging with next to zero from the gaming table.

Unfortunately, in this environment we tend to fall for simple, radical solutions peddled by authoritarian demagogues. By doing so we are actually doubling down on our problems and are likely to see our losses deepen.

Brexit is perhaps the most self-evident morality tale. Poverty and post-industrial decay were very real problems in the central and northern parts of England, driving the Leave vote in 2016. However, the Leave vote has made everything it was supposed to fix far worse even before the leaving actually happened. Sovereignty, global political influence, economic growth and even the political unity of the United Kingdom have all become endangered. Characteristically, those who voted for Brexit stand to lose the most from it.

Yet, polls suggest that in the E.U. elections next month these same voters are going to back Nigel Farage’s new Brexit party.

A similar resentment against the rich educated elites who have garnered most of the benefits from the post-2008 recovery inspired Trump voters in the United States. They, too, are already paying for their choice – in the form of a significantly weaker social safety net and dirtier environment. They and their children will pay a far steeper price in the future – for the budget deficits stemming from Trump’s tax cut for the rich, for climate change, for reduced regulations and oversight of business, for the decline of social cohesion and for the rise of white collar criminality and corruption, those two hallmarks of Trump’s misrule.

Of course there is the booming economy, low unemployment and record-breaking stock prices that Trump constantly touts. Economists point out that it is a bubble economy on low-tax steroids that will eventually go bust – catastrophically so. When the Germans voted in Hitler in the midst of the Depression, they also soon saw tangible improvements to their economic condition and a pickup in national morale. But the way these results had been achieved – by a massive military buildup – already contained the seeds of their eventual destruction. Six years after Hitler came to power German mothers started to get death notices for their sons – and that was just the start of an all-encompassing national horror that didn’t end until 1989.

The U.S. is a superpower with a rich, dynamic economy and the most dominant military since the Roman Empire. It has an enormous margin for error. Ukraine is at the opposite end of the spectrum. Its economy is scarred by the Soviet experience and by three decades of economic mismanagement, misdirection and corruption. Worse, it is under a sustained, relentless military attack from a giant nuclear-armed neighbor. Its very survival as an independent nation state is in danger.

In 2010 Ukrainians voted for Yanukovych in protest against the corruption and mismanagement of the Viktor Yushchenko era. They paid a steep price for that decision: increased criminalization of the economy and politics and further decline of the business climate. The Heavenly Hundred paid for that mistake with their lives, and since Yanukovych’s ouster many thousands of Ukrainians died in the ongoing war in the east.

Of course Ukraine paid for it with the loss of Crimea and Donbas.

Zelenskiy and his team – and, more important, his behind-the-scenes backers – may prove exactly what is needed to set Ukraine on the path toward peace, prosperity and democracy. But this is not what Ukrainians voted for – since there was no way of telling what Zelenskiy will be like as president except for the promise of being an anti-Poroshenko. Ukrainians voted for a modern version of Ostap Bender, the charming, fast-talking protagonist of two satirical novel by Odessa writers Ilya Il’f and Evgeny Petrov.

Alarmingly, the track record of current right-wing populism is bad. In Italy, the Five Stars movement has shown itself every bit as incompetent as its lack of governing experience suggested. Its partner in the ruling coalition, the right wing Lega, is both incompetent and cruel. Both are anti-government insurgents who woke up with their hands on the levers of government. In the United States Trump is systematically undermining and corrupting government institutions as well.

American institutions have existed for more than two centuries and they may survive and recover. In Ukraine, they are still very much in infancy. The problem for Ukraine is that if Zelenskiy turns out to be another self-inflicted wound, consequences for the country may be cataclysmic. They may include anything from further territorial losses to the splitting of the country into a Russian puppet in the east and a much diminished western rump.