class Solution {
public:
vector findOcurrences(string text, string first, string second) {
string tmp="";
vectorstr;
vectorans;
for(auto &c:text){
if(c ==’ '){
str.push_back(tmp);
tmp="";
} else
tmp+=c;
}
str.push_back(tmp);
for(int i=2;i<str.size();i++){
if(str[i-2]==first&&str[i-1]==second)
ans.push_back(str[i]);
}
return ans;
}
};