#include <iostream>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
using namespace std;
string greet(string form ,string lastname,string title,
string::size_type pos,int length)
{
form.replace(8,lastname.length(),lastname);
form.replace(5,2,title,5,length);
return form;
}
int main(int argc,char **argv)
{
string generic1("Dear Ms Daisy:");
string generic2("MrsMsMissPeople");
string lastname("Annap");
string salute=greet(generic1,lastname,generic2,5,4);
cout<<salute<<endl;
return 0;
}