#include #include using namespace std; #define rep(i, n) for(int i=0; i #include int total_child_count(map, int> &childcnt, map, vector>> &child, vector now) { for (vector v : child[now]) { childcnt[now] += total_child_count(childcnt, child, v); } childcnt[now]++; return childcnt[now]; } int main() { string S; cin >> S; int flag = 0; rep(i, S.size()) { if (S[i] == '#') { flag++; } if (flag == 1 && S[i] != '#') { cout << S[i]; } } cout << endl; }