All the place names could be divided into 2 groups:
First Group
The place names have the endings which formally fit the Russian system of endings:
M. Китай, Тайланд, Вьетнам, Амур, Енисеи – он
F. Россия, Финляния, Америка, Волга – она
N. Приморье – оно
Second Group
There are many place names which do not fit the Russian system of endings:
баку, Сочи, Тбилиси, Хельсинки, Миссури, Таити, Токио, Онтарио
These words exist only in this unchangeable (indeclinable) form. Their gender is established in a special way (throught association with the «generic» word).