#include <bits/stdc++.h>
using namespace std;
vector< char > topo;
vector< vector<int> > adj(26);
vector<bool> vis(26,true);
void toposort(int i)
{
vis[i]=true;
for(int j=0;j<adj[i].size();j++)
{
if(!vis[adj[i][j]])
toposort(adj[i][j]);
}
topo.push_back(i+'a');
}
int main()
{
int n,i;
cin>>n;
vector<string> v;
string s;
while(n--)
{
cin>>s;
v.push_back(s);
}
for(i=0;i<v.size();i++)
{
for(int j=0;j<v[i].size();j++)
vis[v[i][j]-'a']=false;
}
int len=v.size();
for(i=0;i<len-1;i++)
{
int l1=v[i].size(),a;
int l2=v[i+1].size();
for(a=0;a<l1 && a<l2;a++)
{
if(v[i][a]!=v[i+1][a])
{
adj[v[i][a]-'a'].push_back(v[i+1][a]-'a');
//cout<<v[i][a]-'a'<<' '<<v[i+1][a]-'a'<<endl;
break;
}
}
}
for(i=0;i<26;i++)
{
if(!vis[i])
{
toposort(i);
}
}
n=topo.size();
for(i=n-1;i>=0;i--)
cout<<topo[i]<<endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp2ZWN0b3I8IGNoYXIgPiB0b3BvOwp2ZWN0b3I8IHZlY3RvcjxpbnQ+ID4gYWRqKDI2KTsKdmVjdG9yPGJvb2w+IHZpcygyNix0cnVlKTsKdm9pZCB0b3Bvc29ydChpbnQgaSkKewogICAgdmlzW2ldPXRydWU7CiAgICBmb3IoaW50IGo9MDtqPGFkaltpXS5zaXplKCk7aisrKQogICAgewogICAgICAgIGlmKCF2aXNbYWRqW2ldW2pdXSkKICAgICAgICAgICAgdG9wb3NvcnQoYWRqW2ldW2pdKTsKICAgIH0KICAgIHRvcG8ucHVzaF9iYWNrKGkrJ2EnKTsKfQppbnQgbWFpbigpCnsKICAgIGludCBuLGk7CiAgICBjaW4+Pm47CiAgICB2ZWN0b3I8c3RyaW5nPiB2OwogICAgc3RyaW5nIHM7CiAgICB3aGlsZShuLS0pCiAgICB7CiAgICAgICAgY2luPj5zOwogICAgICAgIHYucHVzaF9iYWNrKHMpOwogICAgfQogICAgZm9yKGk9MDtpPHYuc2l6ZSgpO2krKykKICAgIHsKICAgICAgICBmb3IoaW50IGo9MDtqPHZbaV0uc2l6ZSgpO2orKykKICAgICAgICAgICAgdmlzW3ZbaV1bal0tJ2EnXT1mYWxzZTsKICAgIH0KICAgIAogICAgaW50IGxlbj12LnNpemUoKTsKICAgIGZvcihpPTA7aTxsZW4tMTtpKyspCiAgICB7CiAgICAgICAgaW50IGwxPXZbaV0uc2l6ZSgpLGE7CiAgICAgICAgaW50IGwyPXZbaSsxXS5zaXplKCk7CiAgICAgICAgZm9yKGE9MDthPGwxICYmIGE8bDI7YSsrKQogICAgICAgIHsKICAgICAgICAgICAgaWYodltpXVthXSE9dltpKzFdW2FdKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBhZGpbdltpXVthXS0nYSddLnB1c2hfYmFjayh2W2krMV1bYV0tJ2EnKTsKICAgICAgICAgICAgICAgIC8vY291dDw8dltpXVthXS0nYSc8PCcgJzw8dltpKzFdW2FdLSdhJzw8ZW5kbDsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIAogICAgICAgIH0KICAgIH0KICAgIAogICAgZm9yKGk9MDtpPDI2O2krKykKICAgIHsKICAgICAgICBpZighdmlzW2ldKQogICAgICAgIHsKICAgICAgICAgICAgdG9wb3NvcnQoaSk7CiAgICAgICAgfQogICAgfQogICAgCiAgICBuPXRvcG8uc2l6ZSgpOwogICAgZm9yKGk9bi0xO2k+PTA7aS0tKQogICAgICAgIGNvdXQ8PHRvcG9baV08PGVuZGw7CiAgICByZXR1cm4gMDsKfQo=