Using std::string for both input and output.