#include <bits/stdc++.h>
using namespace std;
vector<string> v;
void printAllKLengthRec(char set[], string prefix, int n, int k) {
  if (k == 0) {
    v.push_back(prefix);
    return;
  }
  for (int i = 0; i < n; i++) {
    string newPrefix;
    newPrefix = prefix + set[i];
    printAllKLengthRec(set, newPrefix, n, k - 1);
  }
}
void printAllKLength(char set[], int k, int n) {
  printAllKLengthRec(set, "", n, k);
}
int main() {
  char set1[] = {'a', 'b'};
  int k;
  cin >> k;
  printAllKLength(set1, k, 5);
  for (int j = 0; j < k; j++) {
    cout << v[j] << endl;
  }
}
