#include #include #include using namespace std; char l[31]; list sol; list ::iterator it; int n,lit[31],aux[31]; int main() { cin.getline(l,31); cin>>n; cin.get(); for(size_t 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<