#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <algorithm>
#include <cstring>
#include <fstream>
#include <map>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    int n;
    cin >> n;
    string s;
    cin >> s;
    for(int i = 0; i < (1 << n); i++) {
        string t = "";
        for(int j = 0; j < n; j++) {
            if(i & (1 << j)) {
                t += "a";
            }
            else {
                t += "b";
            }
        }
        cout << t << endl;
    }
    return 0;
}
//1753531933519559931371191113597
