#include #include #include using namespace std; using i64 = long long; #define yn(pope) (pope ? "Yes" : "No") #define rep(i, n, m) for (int i = (n); i < (m); i++) #define rrep(i, n, m) for (int i = (n); i > m; i--) #define IINF (1 << 30) #define INF (1ll << 60) #define all(v) v.begin(), v.end() int main() { string s; cin >> s; int slen = s.length(); rep(i, 0, slen - 1) { rep(j, i + 1, slen) { if (s[i] == '#' && s[j] == '#') { cout << s.substr(i + 1, j - i - 1); } } } cout << endl; return 0; }