#include <iostream>
#include <map>
#include <regex>
#include <string>

int main()
{
    const std::map<int, std::string> m = {{1, "New York"}, {2, "summer"}};
    std::string s = "I am in #1 city, it is now #2 time";
    
    for (const auto& [id, value] : m) {
        s = std::regex_replace(s, std::regex("#" + std::to_string(id)), value);
    }
    std::cout << s << std::endl;
}
