string replaceSpaces(string &str) {
size_t t;
while((t=str.find(' '))!=string::npos){
str.replace(t,1,"%20");
}
return str;
}
string replaceSpaces(string &str) {
string res;
for (auto x : str)
if (x == ' ')
res += "%20";
else
res += x;
return res;
}