//以空格分割的字符串读入
char str[30][5] = { 0 };
int num[30] = { 0 };
char graph[30] = { 0 };
int n,i,j,max,row;
int flag = 1;
cin >> n;
for (i = 0; i < n; i++) {
scanf("%s", str[i]);// cin>>str[i];
}
row = -1;
flag = 1;
while (flag) {
flag = 0;
for (j = 0; j < n; j++) {
if (num[j] <= row) {
cout << graph[j]<<" ";
flag = 1;
}
else cout << " ";
}
printf("\n");
row--;
}//画负半轴
for (i = 0; i < max; i++) {
for (j = 0; j < n; j++) {
if (num[j] >= max - i) cout << graph[j]<<" ";
else cout << " ";
}
printf("\n");
}// 画正半轴