#include <bits/stdc++.h>
using namespace std;
static const int INF = INT_MAX;
static const long long LINF = LLONG_MAX;
static const int MIN = INT_MIN;
static const long long LMIN = LLONG_MIN;
static const int MOD = 1000000007;
static const int SIZE = 200005;
const int dx[] = {0, -1, 1, 0};
const int dy[] = {-1, 0, 0, 1};
vector<int> Div(int n) {
  vector<int> ret;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(ret.begin(), ret.end());
  return ret;
}
void dfs(string s, int pos);
int n;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  string s = "a";
  dfs(s, 1);
  return 0;
}
void dfs(string s, int pos) {
  if (pos == n) {
    cout << s << '\n';
    return;
  }
  for (int i = 0; i <= pos; ++i) {
    string t = s;
    if (i == 0) t += "a";
    if (i == 1) t += "b";
    if (i == 2) t += "c";
    if (i == 3) t += "d";
    if (i == 4) t += "e";
    if (i == 5) t += "f";
    if (i == 6) t += "g";
    if (i == 7) t += "h";
    if (i == 8) t += "i";
    if (i == 9) t += "j";
    dfs(t, pos + 1);
  }
  return;
}
