#include<bits/stdc++.h>
using namespace std;
string s, shi;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> shi;
if (shi == "<bs>") {
if (!shi.empty())
s.pop_back();
} else
s += shi;
}
cout << s;
return 0;
}
当我输入
1
<bs>
时,输出一大堆奇怪的东西······