#include <bits/stdc++.h>
using namespace std;
int a[300010] = {1, 1, 1, 2, 1, 2, 1, 5,  2, 2, 1, 5, 1, 2, 1, 14,
                 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
int n;
char s[300010];
void dfs(int now) {
  if (now == n + 1) {
    cout << s + 1 << endl;
    return;
  }
  if (now == 1) {
    s[now] = 'a';
    dfs(now + 1);
  } else {
    for (int i = 'a'; i <= s[now - 1] + 1; i++) {
      s[now] = i;
      dfs(now + 1);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  dfs(1);
  return 0;
}
