Assuming you have a nice list of your Words, you could easily create an array
with them, doing a little data manipulation.
Afterwards you can loop throug your $array
and insert the Term accordingly:
$yourcities = file($filename, FILE_IGNORE_NEW_LINES); // all your valuesfrom the .txt file
foreach( $yourcities as $thiscity ) {
wp_insert_term(
$thiscity, // the term, in your case the name of the city
'category', // the taxonomy, in your case category
array(
'description'=> '', // if available
'slug' => '', // leave blank if not available
'parent'=> $parent_term_id // if you do it hierarchical, be sure to insert the parent ID here
)
);
}