#include <bits/stdc++.h>
using namespace std;
template <typename S, typename T>
ostream& operator<<(ostream& out, pair<S, T> const& p) {
  out << '(' << p.first << ", " << p.second << ')';
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> const& v) {
  int l = v.size();
  for (int i = 0; i < l - 1; i++) out << v[i] << ' ';
  if (l > 0) out << v[l - 1];
  return out;
}
template <typename T>
void trace(const char* name, T&& arg1) {
  cout << name << " : " << arg1 << endl;
}
template <typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  trace(comma + 1, args...);
}
const int inf = 1e9 + 10;
const long long int INF = 1e18 + 10;
const int MOD = 1e9 + 7;
const int MAXN = 2e5 + 10;
void get_bin(int sm) {
  string s = "";
  while (sm > 0) {
    if (sm & 1)
      s += "1";
    else
      s += "0";
    sm /= 2;
  }
  reverse(s.begin(), s.end());
  cout << s << endl;
}
set<string> ans;
void comp(int mask, int ind, string s, int cnt) {
  if (ind > s.length()) return;
  if (cnt == s.length()) ans.insert(s);
  int n = s.length();
  int sm = (1 << n) - mask - 1;
  for (int m1 = sm; m1; m1 = (m1 - 1) & sm) {
    string s1 = s;
    int cnt1 = cnt;
    for (int i = 0; i < n; i += 1) {
      if (m1 & (1 << i)) {
        if (i < ind) {
          s1 = s;
          break;
        }
        cnt1++;
        s1[i] = 'a' + ind;
      }
    }
    comp(m1 | mask, ind + 1, s1, cnt1);
  }
}
void solve() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << 'a' << endl;
    return;
  }
  string s;
  for (int i = 0; i < n; i += 1) {
    s += "a";
  }
  for (int msk = 0; msk < 1 << n; msk += 1) {
    if ((msk & 1) != 0) {
      comp(msk, 1, s, __builtin_popcount(msk));
    }
  }
  for (auto i : ans) {
    cout << i << endl;
    string s = i;
    for (int j = 0; j < 25; j += 1) {
      for (int k = 0; k < n; k += 1) s[k] += j + 1;
      if (ans.find(s) != ans.end()) {
        cout << "this is a problem" << endl;
        return;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
