#include <bits/stdc++.h>
using namespace std;
long long counting = 0;
void DFS(long long i, long long N, vector<char>& A) {
  if (i == N && counting < N) {
    for (long long j = 0; j < N; j++) {
      cout << A.at(j);
    }
    cout << endl;
    counting++;
    return;
  } else if (i == N && counting >= N)
    return;
  A.push_back('a');
  DFS(i + 1, N, A);
  A.pop_back();
  A.push_back('b');
  DFS(i + 1, N, A);
  A.pop_back();
}
int main() {
  long long N;
  cin >> N;
  vector<char> A;
  DFS(0, N, A);
}
