A simpler way, ranking by the number of points will work here, but there will be no colors.
Enter the commands:
/scoreboard objectives add countryScore dummy "TOP"
/scoreboard players set Ukraina countryScore 0
/scoreboard players set Kazakhstan countryScore 0
/scoreboard players set Bilorus...