#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const int mod = 1000000007;
P ar4[4] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
P ar8[8] = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1},
            {0, 1},   {1, -1}, {1, 0},  {1, 1}};
__attribute__((constructor)) void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
int main() {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; n > i; i++) {
    A[i] = 0;
  }
  A[n - 1] = -1;
  while (true) {
    int nw = n - 1;
    while (0 < nw) {
      if (A[nw] - A[nw - 1] < 1) {
        A[nw]++;
        break;
      } else {
        A[nw] = 0;
      }
      nw--;
    }
    if (!nw) break;
    for (int i = 0; n > i; i++) {
      cout << (char)('a' + A[i]);
    }
    cout << endl;
  }
}
