#include <bits/stdc++.h>
using namespace std;
int a[11];
int n;
map<string, int> mp;
void check() {
  int s[11];
  string str = "";
  for (int i = 0; i < n; i++) s[i] = -1;
  int l = 1;
  for (int i = 0; i < n; i++) {
    if (s[a[i]] != -1)
      str += s[a[i]] + 'a' - 1;
    else {
      s[a[i]] = l++;
      str += s[a[i]] + 'a' - 1;
    }
  }
  if (!mp[str]) {
    mp[str] = 1;
    cout << str << '\n';
  }
}
void dfs(int index) {
  if (index == n - 1) {
    check();
    return;
  }
  for (int i = 0; i < n; i++) {
    a[index] = i;
    dfs(index + 1);
  }
}
int main() {
  while (cin >> n) dfs(0);
}
