#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "a" << endl;
    return 0;
  }
  std::vector<std::string> mat[10][10];
  for (int i = 0; i < (int)(10); i++)
    for (int j = 0; j < (int)(10); j++) mat[i][j].clear();
  string a = "a";
  mat[0][0].push_back(a);
  for (int i = 0; i < (int)(n - 1); i++) {
    for (int j = i; j < n - 1; j++) {
      for (string str : mat[i][j]) {
        for (int k = 0; k < (int)(i + 1); k++)
          mat[i][j + 1].push_back(str + (char)('a' + k));
        mat[i + 1][j + 1].push_back(str + (char)('a' + i + 1));
      }
    }
  }
  for (int i = 0; i < (int)(9); i++) {
    for (string str : mat[i][n - 2]) {
      for (int k = 0; k < (int)(i + 1); k++)
        cout << (str + (char)('a' + k)) << endl;
      cout << (str + (char)('a' + i + 1)) << endl;
    }
  }
  return 0;
}
