#include <bits/stdc++.h>
using namespace std;
int main() {
  long long h, W, ans;
  int N, a, b, c, d;
  cin >> N;
  string S, F;
  S = "a";
  for (int i = 1; i < N; i++) {
    S += 'a';
  }
  for (int p = 0; p < 2; p++) {
    F = S;
    F[1] += p;
    if (N == 2) {
      cout << F << endl;
      continue;
    }
    for (int i = 0; i < p + 2; i++) {
      F[2] = 'a';
      F[2] += i;
      if (N == 3) {
        cout << F << endl;
        continue;
      }
      for (int j = 0; j < i + 2; j++) {
        F[3] = S[3];
        F[3] += j;
        if (N == 4) {
          cout << F << endl;
          continue;
        }
        for (int u = 0; u < j + 2; u++) {
          F[4] = S[4];
          F[4] += u;
          if (N == 5) {
            cout << F << endl;
            continue;
          }
          for (int g = 0; g < u + 2; g++) {
            F[5] = S[5];
            F[5] += g;
            if (N == 6) {
              cout << F << endl;
              continue;
            }
            for (int n = 0; n < g + 2; n++) {
              F[6] = S[6];
              F[6] += n;
              if (N == 7) {
                cout << F << endl;
                continue;
              }
              for (int m = 0; m < n + 2; m++) {
                F[7] = S[7];
                F[7] += m;
                if (N == 8) {
                  cout << F << endl;
                  continue;
                }
                for (int k = 0; k < m + 2; k++) {
                  F[8] = S[8];
                  F[8] += k;
                  if (N == 9) {
                    cout << F << endl;
                    continue;
                  }
                  for (int t = 0; t < k + 2; t++) {
                    F[9] = S[9];
                    F[9] += t;
                    cout << F << endl;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
