#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char s[11];
  for (int i = 0; i < 11; i++) {
    s[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    s[i] = 'a';
  }
  while (1) {
    cout << s << endl;
    s[n - 1]++;
    for (int i = n - 1; i > 1; i--) {
      if (s[i] >= (s[i - 1] + 2)) {
        s[i] = 'a';
        s[i - 1]++;
      }
    }
    if (s[n - 1] >= ('a' + n - 1)) {
      cout << s << endl;
      break;
    }
  }
  return 0;
}
