#include <bits/stdc++.h>
using namespace std;
int n, i, ans[16];
void bkt(int k) {
  if (k == n - 1) {
    for (int it = 0; it < n; ++it) cout << char(ans[it] + 'a');
    cout << '\n';
    return;
  }
  ans[k + 1] = ans[k];
  bkt(k + 1);
  ans[k + 1] = ans[k] + 1;
  bkt(k + 1);
}
int main() {
  cin >> n;
  for (i = 0; i < n; ++i) ans[i] = 0;
  bkt(0);
  return 0;
}
