#include <bits/stdc++.h>
using namespace std;
int n;
char s[10];
void dfs(int rem, char c) {
  int i, j;
  if (rem == 0) {
    for (i = 0; i < n; i++) cout << s[i];
    cout << endl;
    return;
  }
  for (j = n - 1; j >= 0; j--)
    if ((rem >> j) % 2 == 1) break;
  int ptr = j;
  for (i = (1 << n) - 1; i > 0; i--) {
    if ((i >> ptr) % 2 == 0) continue;
    for (j = 0; j < n; j++) {
      if ((i >> (n - 1 - j)) % 2 == 1) {
        if ((rem >> (n - 1 - j)) % 2 == 0) break;
        s[j] = c;
      }
    }
    if (j == n) dfs(rem - i, c + 1);
  }
}
int main() {
  cin >> n;
  dfs((1 << n) - 1, 'a');
  return 0;
}
