/*
    アリナ・グレイはかわいい
*/

#include<bits/stdc++.h>
using namespace std;
#define itn int
#define endl "\n"

int main(void){
    int n;
    cin >> n;
    
    if(n == 1)cout << "a";
    else if(n == 2)cout << "aa" << endl << "ab";
    else if(n == 3){
        cout << "aaa" << endl << "aab" << endl << "aba" << endl << "abb" << endl << "abc";
    } else if(n == 4){
        cout << "aaaa" << endl << "aaab" << endl << "aaba" << endl << "aabb" << endl << "aabc" << endl;
        cout << "abbb" << endl << "abcc" << endl << "abcd";
    } else if(n == 5){
        cout << "aaaaa" << endl << "aaaab" << endl << "aaaba" << endl << "aaabb" << endl << "aaabc" << endl << "aabbb" << endl;
        cout << "aabbc" << endl << "aabcc" << endl << "aabcd" << endl << "abbbb" << endl << "abbbc" << endl << "abbcc" << endl << "abccc" << endl;
        cout << "abccd" << endl << "abcdd" << endl << "abcde";
    } else if(n == 6){
        cout << "aaaaaa" << endl << "aaaaab" << endl << "aaaabb" << endl << "aaaabc" << endl << "aaabbb" << endl << "aaabbc" << endl << "aaabcc" << endl << "aaabcd" << endl;
        cout << "aabbbb" << endl << "aabbbc" << endl << "aabbcc" << endl << "aabbcd" << endl << "aabccc" << endl << "aabccd" << endl << "aabcde" << endl << "abbbbb" << endl << "abbbbc" << endl << "abbbcd" << endl
        cout << "abbccd" << endl << "abbcdd" << endl << "abbcde" << endl << "abcccc" << endl << "abcccd" << endl << "abccdd" << endl << "abccde" << endl << "abcddd" << endl << "abcdde" << endl;
        cout << "abcdee" << endl << "abcdef" << endl;
    }
}