#include <bits/stdc++.h>
using namespace std;
string alpha = "abcdefghij";
bool check(vector<int> aaa) {
  int a;
  ;
  for (int i = 0; i < (int)(aaa.size()); i++) {
    if (aaa[i] > i) return false;
  };
  for (int i = 0; i < (int)(aaa.size() - 1); i++) {
    if (aaa[i] > aaa[i + 1] && aaa[i] != i) return false;
  };
  for (int i = 0; i < (int)(aaa.size() - 1); i++) {
    if (abs(aaa[i] - aaa[i + 1]) > 1) return false;
  }
  return true;
}
char output(int a) { return alpha[a]; }
int main() {
  int N;
  cin >> N;
  if (N == 1) {
    cout << "a" << endl;
    return 0;
  }
  vector<int> A(N, 0);
  while (A[0] != 1) {
    if (check(A)) {
      ;
      for (int i = 0; i < (int)(N); i++) {
        cout << output(A[i]);
      }
      cout << endl;
    }
    A[N - 1]++;
    int now = N - 1;
    while (A[now] == N && now != 0) {
      A[now] = 0;
      now--;
      A[now]++;
    }
  }
}
