#include <bits/stdc++.h>
using namespace std;
void dfs(string s, char c) {
  int i, j;
  for (i = 0; i < s.length(); i++)
    if (s[i] == '.') break;
  int ptr = i;
  if (ptr == s.length()) {
    cout << s << endl;
    return;
  }
  s[ptr] = c;
  vector<int> pos;
  for (i = s.length() - 1; i >= 0; i--) {
    if (s[i] == '.') pos.push_back(i);
  }
  for (i = (1 << pos.size()) - 1; i >= 0; i--) {
    string t = s;
    for (j = 0; j < pos.size(); j++) {
      if ((i >> j) & 1) {
        t[pos[j]] = c;
      }
    }
    dfs(t, c + 1);
  }
}
int main() {
  int n;
  cin >> n;
  string s;
  for (int i = 0; i < n; i++) s += '.';
  dfs(s, 'a');
  return 0;
}
