#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool check(string &a,string& b){
int k=0;
for(int i=0;i<a.size();i++)if(a[i]!=b[i]){
k++;
if(k==2)return false;
};
return true;
};
int main()
{
vector<string> s;
int n;
cin>>n;
s.resize(n);
for(int i=0;i<n;i++)cin>>s[i];
bool fl=false;
for(int i=0;i<n;i++){
fl=false;
for(int j=0;j<n;j++)if(!check(s[i],s[j])){
fl=true;
break;
};
if(!fl){
cout<<s[i];
break;
};
};
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmJvb2wgY2hlY2soc3RyaW5nICZhLHN0cmluZyYgYil7CiAgICBpbnQgaz0wOwogICAgZm9yKGludCBpPTA7aTxhLnNpemUoKTtpKyspaWYoYVtpXSE9YltpXSl7CiAgICAgICAgaysrOwogICAgICAgIGlmKGs9PTIpcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIHJldHVybiB0cnVlOwp9OwoKaW50IG1haW4oKQp7CiAgICB2ZWN0b3I8c3RyaW5nPiBzOwogICAgaW50IG47CiAgICBjaW4+Pm47CiAgICBzLnJlc2l6ZShuKTsKICAgIGZvcihpbnQgaT0wO2k8bjtpKyspY2luPj5zW2ldOwogICAgYm9vbCBmbD1mYWxzZTsKICAgIGZvcihpbnQgaT0wO2k8bjtpKyspewogICAgICAgIGZsPWZhbHNlOwogICAgICAgIGZvcihpbnQgaj0wO2o8bjtqKyspaWYoIWNoZWNrKHNbaV0sc1tqXSkpewogICAgICAgICAgICBmbD10cnVlOwogICAgICAgICAgICBicmVhazsKICAgICAgICB9OwogICAgICAgIGlmKCFmbCl7CiAgICAgICAgICAgIGNvdXQ8PHNbaV07CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH07CiAgICB9OwogICAgcmV0dXJuIDA7Cn0K