#include #include #include using namespace std; list sol; list ::iterator it; int n,lit[31],aux[31]; int main() { string l; getline(cin,l); cin>>n; cin.get(); for(unsigned int i=0;ilit[i]) ok=0; aux[i]=0; } if(ok){ //char *cuv=new char[strlen(c)]; //strcpy(cuv,c); sol.push_back(c); } } sol.sort(); for(it=sol.begin();it!=sol.end();++it) cout<<*it<