#include using namespace std; string S[1010],G[1010]; mapmp; int main(){ int t; string v; cin>>t; for(int i=0;i>S[i]; G[i]=S[i]; sort(G[i].begin(),G[i].end()); mp[G[i]]++; } for(int i=0;i1) continue; for(int j=0;j<26;j++){ char ch=j+'a'; string w=G[i]; w.push_back(ch); sort(w.begin(),w.end()); if(mp[w]==0){ S[i].push_back(ch); cout<