<spam data-letter="П"></span>
<spam data-letter="р"></span>
<spam data-letter="и"></span>
<spam data-letter="в"></span>
<spam data-letter="е"></span>
<spam data-letter="т"></span>
[countriesSelect, citiesSelect].forEach((el)=>{
el.addEventListener('change', () => {
if ( ) //...
else //...
}
})
const paragraph = {
country: document.querySelector('p .country');
city: document.querySelector('p .city');
}
//... changeText заменить на соответствующий
paragraph.country.innerHTML = countriesSelect.value;
paragraph.city.innerHTML = citiesSelect.value;