#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <iterator>
using namespace std;


int main() {
	string input="Hello, world ! I whish you all \na happy new year 2016 !";
	vector<string> sentence; 
	vector<string> search{"We", "You", "I"}; 
	
	stringstream sst(input);    // split the string into its pieces 
	string tmp; 
	while (sst>>tmp) 
	    sentence.push_back(tmp); 
	
	                            // how to manipulate easily the vecotr of words
	copy(sentence.begin(), sentence.end(), ostream_iterator<string>(cout,"/"));    
	cout<<endl;     
	                            // search words
	auto it =  find_first_of(sentence.begin(), sentence.end(), 
	                           search.begin(), search.end()); 
	                           
	                           // display remaining of the sentence
	copy(it , sentence.end(), ostream_iterator<string>(cout,"/"));    
	cout<<endl;   

    stringstream so;
	copy(it , sentence.end(), ostream_iterator<string>(so," ")); 
	string result = so.str(); 
	cout<<result<<endl;   
	
	return 0;
}