#include <iostream>
#include <cctype>
std::string isolate_word(const std::string &word) {
std::string isolated_word;
for(auto iter = word.cbegin(); iter != word.cend(); ++iter) {
if(!std::ispunct(*iter)) {
isolated_word+=std::tolower(*iter);
}
}
return isolated_word;
}
int main(void) {
std::cout << isolate_word("(,he,llo,)") << '\n';
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y2N0eXBlPgoKc3RkOjpzdHJpbmcgaXNvbGF0ZV93b3JkKGNvbnN0IHN0ZDo6c3RyaW5nICZ3b3JkKSB7CiAgICBzdGQ6OnN0cmluZyBpc29sYXRlZF93b3JkOwogICAgZm9yKGF1dG8gaXRlciA9IHdvcmQuY2JlZ2luKCk7IGl0ZXIgIT0gd29yZC5jZW5kKCk7ICsraXRlcikgewogICAgICAgIGlmKCFzdGQ6OmlzcHVuY3QoKml0ZXIpKSB7CiAgICAgICAgICAgIGlzb2xhdGVkX3dvcmQrPXN0ZDo6dG9sb3dlcigqaXRlcik7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIGlzb2xhdGVkX3dvcmQ7Cn0KCmludCBtYWluKHZvaWQpIHsKICAgIHN0ZDo6Y291dCA8PCBpc29sYXRlX3dvcmQoIigsaGUsbGxvLCkiKSA8PCAnXG4nOwogICAgcmV0dXJuIDA7Cn0=