#include <iostream>
#include <vector>
#include <list>
#include <set>
#include <queue>
#include <map>
#include <algorithm>
#include <functional>
#include <string>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <tuple>
using namespace std;

#define REP(i,p,n) for(ll i=p;i<ll(n);++i)
#define rep(i,n) REP(i,0,n)

using ll = long long int;
using pll = pair<ll, ll>;

const ll mod = static_cast<ll>(1e9) + 7;

int main()
{
    ll N;
    cin >> N;

    vector<ll> values;

    const auto isSame = [&N](auto s, auto t)
    {
        for (ll x=0;x<N;++x)
        for (ll y=x+1;y<N;++y)
        {
            const bool ss = ((s >> x) & 1) == ((s >> y) & 1);
            const bool tt = ((t >> x) & 1) == ((t >> y) & 1);
            if (ss != tt) { return false; }
        }

        return true;
    };

    const auto isUsed = [&](auto s)
    {
        for (const auto& t : values)
        {
            const bool same = isSame(s, t);
            if (same) { return true; }
        }

        return false;
    };

    for (ll i=0,n=1<<N;i<n;++i)
    {
        const bool used = isUsed(i);
        if (used) { continue; }

        values.emplace_back(i);

        rep (j, N)
        {
            const char c = ((i >> (N - j - 1)) & 1 ? 'b' : 'a');
            cout << c;
        }

        cout << endl;
    }

    return 0;
}
