#include <bits/stdc++.h>
using namespace std;
int N;
char c[11] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'};
void dsf(int d, int n, string s) {
  if (d == 1) {
    cout << s << endl;
    return;
  }
  for (int i = 0; i <= n; i++) {
    if (abs(c[i] - s[s.size() - 1]) > 1) continue;
    dsf(d - 1, n + 1, s + c[i]);
  }
  return;
}
int main() {
  cin >> N;
  dsf(N, 1, "a");
}
