#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    char k;
    int t;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n-i;j++){
            cout<<" ";
        }
        k=char(65+i);
        t=0;
        for(int j=1;j<=i*2-1;j++){
            if(k=='A')t++;
            if(t==0)k--;
            else k++;
            cout<<k;
        }
        cout<<endl;
    }
}
/**************************************************************
	Problem: 1096
	User: luyanchen
	Language: C++
	Result: Accepted
	Time:9 ms
	Memory:2072 kb
****************************************************************/