#include <iostream>
#include <string>
using namespace std;
string test(string s, char c) {
string temp{ s[0] };
auto n{ s.size() - 1 };
for (auto i{ 1 }; i < n; ++i)
if (s[i] != c)
temp += s[i];
temp += s[n];
return temp;
}
int main() {
cout << test("xabjbhtrb", 'b') << endl;
return 0;
}