#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;
// #define int long long
mt19937 rnd(time(0));
typedef long long ll;
typedef long double ld;

// #define _GLIBCXX_DEBUG
#define f first
#define s second
#define pb push_back
#define pii pair<int, int> 
#define vi vector<int>
#define int ll

void solve(){
	int n;
	cin >> n;
	set<int> s;
	for (int i = 0; i < (1 << n); ++i) {
		if (s.count(i) || s.count(((1 << n) - 1) ^ i))
			continue;
		s.insert(i);
		for (int j = n - 1; j >= 0; --j) {
			if ((1 << j) & i) {
				cout << 'b';
			} else {
				cout << 'a';
			}
		}
		cout << endl;
	}
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	
	int t = 1;
	while(t--){
		solve();
	}
	
	return 0;
}
