include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
int main()
{
int n;
cin >> n;
vector<string> s(n);
int max_len = 0;
for(int i = 0; i < n; i ++ )
{
cin >> s[i];
max_len = max(max_len, (int)s[i].length());
}
vector<string> result(max_len, string(n, '*'));
for(int i = 0; i < n; i ++ )
{
string current_string = s[n - i - 1];
for(int j = 0; j < current_string.length(); j++)
{
result[j][i] = current_string[j];
}
}
for(int i = 0; i < max_len; i ++ )
{
while(!result[i].empty() && result[i].back() == '*')
{
result[i].pop_back();
}
}
for(string& line : result)
{
cout << line << endl;
}
return 0;
}