#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int s = 'A';
for(int i = 1; i <= n; i++){
s += i - 1;
bool f = 0;
for(int j = 1; j <= n; j++){
if(s > 'Z'){
s = char('A');
f = 1;
}
cout << char(s);
s += 1;
}cout << endl;
if(f)continue;
s -= (i + n - 1);
}
return 0;
}