#include #include int main() { std::string text; if (!std::getline(std::cin, text)) return 1; auto pos = text.find("C++"); if (pos != std::string::npos) text.replace(pos, 3, "CPP"); std::cout << text << "\n" << text.size() << "\n"; }