for (const auto& word : wordsList)
{
const std::map<std::string, int> wordsCount = buildWordsCount(bookText);
std::cout << wordsCount.at(word);
}
const std::map<std::string, int> wordsCount = buildWordsCount(bookText);
for (const auto& word : wordsList)
{
std::cout << wordsCount.at(word);
}