#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
string f(int i) {
  switch (i) {
    case 0:
      return "a";
    case 1:
      return "b";
    case 2:
      return "c";
    case 3:
      return "d";
    case 4:
      return "e";
    case 5:
      return "f";
    case 6:
      return "g";
    case 7:
      return "h";
    case 8:
      return "i";
    case 9:
      return "j";
    default:
      return "";
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> x(n);
  for (int& i : x) i = 0;
  while (true) {
    string res;
    for (int i = 0; i < n; ++i) {
      res += f(x[i]);
    }
    cout << res << endl;
    bool ok = true;
    for (int i = 0; i < n; ++i) {
      if (x[i] != i) ok = false;
    }
    if (ok) return 0;
    int max_num = 0;
    for (int i = 0; i < n - 1; ++i) {
      if (max_num < x[i]) max_num = x[i];
    }
    max_num++;
    x[n - 1]++;
    if (x[n - 1] > max_num) {
      x[n - 1]--;
      int j = n - 2;
      while (true) {
        if (x[j + 1] - x[j] != 1) break;
        j--;
      }
      if (j < n - 2) j++;
      x[j]++;
      for (int i = j + 1; i < n; ++i) x[i] = 0;
    }
  }
  return 0;
}
