#include #include int main(void){ using namespace std; string a; int t; vector::iterator it; char s; vector v; int n; cin >> n; for(int i=0;i> t >> s; if(t==0) v.push_back(s); /**/ if(t==1){ it = v.begin(); v.insert(it,1,s); } /**/ } for(int i=0;i