#include <iostream>
#include <regex>
using namespace std;

int main() {
    std::string str = "\"Hello people \" how are you doing \" what are \" you upto \"";
    str = std::regex_replace(str, std::regex("(?!^)\"(?!$)"), "&quot;");
    std::cout << str << std::endl;
	return 0;
}