#include <bits/stdc++.h>
using namespace std;
bool keta(int num, int n) {
  n = n + 1;
  for (int i = 0; i < n - 1; i++) {
    num = num / 10;
  }
  return num % 10;
}
int main(void) {
  int N;
  cin >> N;
  int max = 0;
  for (int i = 0; i < N; i++) {
    max += pow(10, i) * (N - i);
  }
  bool pat[100][N * N];
  int thennum[100];
  int patlen = 0;
  for (int i = 0; i <= max; i++) {
    bool ptn[N * N];
    int pt = 0;
    for (int j = 0; j < N; j++) {
      for (int k = j; k < N; k++) {
        if (keta(i, k) == keta(i, j)) {
          ptn[pt] = true;
          pt++;
        } else {
          ptn[pt] = false;
          pt++;
        }
      }
    }
    bool original = true;
    int fnum = 0;
    for (int j = 0; j < patlen; j++) {
      bool same = true;
      for (int k = 0; k < N * N; k++) {
        if (ptn[k] != pat[j][k]) {
          same = false;
        }
      }
      if (!same) fnum++;
    }
    if (patlen == fnum) {
      for (int l = 0; l < N * N; l++) {
        pat[patlen][l] = ptn[l];
      }
      thennum[patlen] = i;
      patlen++;
    }
  }
  for (int i = 0; i < patlen; i++) {
    for (int j = 0; j < N; j++) {
      int ch = keta(thennum[i], N - j - 1);
      cout << (char)('a' + (char)ch);
    }
    cout << "\n";
  }
  return 0;
}
