#include <bits/stdc++.h>
using namespace std;
int N;
void solve(string tmp, int n);
int main(void) {
  cin >> N;
  solve("a", 2);
  return 0;
}
void solve(string tmp, int n) {
  if (n > N) {
    cout << tmp << endl;
    return;
  }
  for (int i = 0; i < (n); i++) {
    string c = "a";
    c[0] += i;
    if (c[0] - tmp[tmp.length() - 1] > 1) break;
    solve(tmp + c, n + 1);
  }
}
