#include <iostream>
#include <algorithm>

using namespace std;

int main() {
	// your code goes here
	std::string s = "Have you seen the new Ssang Yong?";
	
	auto comparator = [](const char left, const char right) {
		bool isEqual = std::tolower(left) == std::tolower(right);
		bool isLeftConverted = left == std::tolower(left);
		bool isRightConverted = right == std::tolower(right);
		return isEqual && (isLeftConverted ^ isRightConverted);
	};
	
	for (auto it = std::adjacent_find(s.begin(), s.end(), comparator); 
	     it != s.end(); 
	     it = adjacent_find(it, s.end(), comparator))
	{
		it = s.erase(it, std::next(it, 2));
		
	}
	std::cout << s;
	return 0;
}