#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool IsUpper(int Input){return ((Input>=65)&&(Input<=90));}
int main(){
vector<string> Input;
string Output = "";
int Number,Maxlength = 0;
cin>>Number;
for(int I=0;I<Number;I++){
string Buffer;
cin>>Buffer;
if(Buffer.length()>Maxlength){Maxlength = Buffer.length();}
Input.push_back(Buffer);
}
for(int I=0;I<Maxlength;I++){
for(int J=0;J<Number;J++){
if(I<Input[J].length()){
if(IsUpper(Input[J][I])){Output+=Input[J][I];}
}
}
}
cout<<Output<<'\n';
}