#include #include using namespace std; int main(void){ //input string str; cin >> str; //calc str = str.substr(str.find('#') + 1); str = str.erase(str.rfind('#')); //output cout << str << endl; }