#include <bits/stdc++.h>
#define Phuong_ ios_base::sync_with_stdio(0); cin.tie(0);
#define pb push_back
#define mp make_pair

/// easy access -------------
using namespace std;
using ll = long long;
using ld = long double;
typedef pair<int,int> pii;
///-------------------------

/// problem's variable---------------


///--------------------------

int main()
{
    Phuong_;
    int n;
    cin >> n;
    int num = (1<<(n-1));
    for(int i=0; i<num; ++i)
    {
        string s;
        s="";
        int k=i;
        for(int j=0; j<n; ++j)
        {
            if (k&1) s='b'+s; else s='a'+s;
            k>>=1;
        }
        cout << s << '\n';
    }
    return 0;
}

