#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
using namespace std;
namespace basic {
using ll = long long int;
const ll inf = 1e9 + 7;
template <class T>
void refresh(T& a, ll n) {
  assert(n >= 0);
  a.clear();
  a.resize(n);
}
template <class X, class Y>
void refresh_with_value(X& a, ll n, Y value) {
  assert(n >= 0);
  a.clear();
  a.resize(n, value);
}
template <class X>
void Unique(X& a) {
  sort((a).begin(), (a).end());
  a.erase(unique((a).begin(), (a).end()), a.end());
}
template <class T>
ll uniq_size(T a) {
  sort((a).begin(), (a).end());
  return distance(a.begin(), unique((a).begin(), (a).end()));
}
template <class T>
void smin(T& a, T b) {
  a = min(a, b);
}
template <class T>
void smax(T& a, T b) {
  a = max(a, b);
}
}  // namespace basic
using namespace basic;
namespace IO {
void open() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void close() {}
template <class T>
istream& operator>>(istream& cin, vector<T>& a) {
  for (auto& i : a) cin >> i;
  return cin;
}
istream& operator>>(istream& cin, pair<ll, ll>& a) {
  cin >> a.first;
  cin >> a.second;
  return cin;
}
istream& operator>>(istream& cin, pair<int, int>& a) {
  cin >> a.first;
  cin >> a.second;
  return cin;
}
template <class X>
ostream& operator<<(ostream& cout, pair<X, X>& a) {
  cout << a.first << " " << a.second << "\t";
  return cout;
}
template <class X>
ostream& operator<<(ostream& cout, vector<X>& a) {
  for (auto i : a) cout << i << " ";
  return cout;
}
template <class X>
ostream& operator<<(ostream& cout, vector<vector<X>>& a) {
  for (auto& i : a) {
    cout << i << "\n";
  }
  return cout;
}
template <class X, class Y>
ostream& operator<<(ostream& cout, unordered_map<X, Y>& a) {
  for (auto& i : a) {
    cout << i.first << "\t" << i.second << "\n";
  }
  return cout;
}
template <class X, class Y>
ostream& operator<<(ostream& cout, map<X, Y>& a) {
  for (auto& i : a) {
    cout << i.first << "\t" << i.second << "\n";
  }
  return cout;
}
template <class X>
ostream& operator<<(ostream& cout, set<X>& a) {
  for (auto i : a) cout << i << " ";
  return cout;
}
void in(double& x) {
  string t;
  cin >> t;
  x = stod(t);
}
void in(long double& x) {
  string t;
  cin >> t;
  x = stold(t);
}
template <class T>
void in(T& x) {
  cin >> x;
}
template <class X, class... Args>
void in(X& first, Args&... rest) {
  in(first);
  in(rest...);
}
const int precision = 1;
void out(long double& x) {
  cout << fixed << setprecision(precision) << x << '\n';
}
template <class T>
void out(T x) {
  cout << x << '\n';
}
template <class Arg, class... Args>
void out(Arg first, Args... rest) {
  cout << first << ' ';
  out(rest...);
}
}  // namespace IO
using namespace IO;
int main() {
  open();
  ll n;
  in(n);
  string s = "abcdefghijkl";
  set<string> st;
  for (__typeof((1 << n)) i = (0) - ((0) > ((1 << n)));
       i != ((1 << n)) - ((0) > ((1 << n))); i += 1 - 2 * ((0) > ((1 << n)))) {
    ll index = 0;
    string curr = "";
    for (__typeof(n) j = (0) - ((0) > (n)); j != (n) - ((0) > (n));
         j += 1 - 2 * ((0) > (n))) {
      if ((i >> j) & 1) {
        curr += s[index++];
      } else
        curr += "a";
    }
    st.insert(curr);
  }
  for (auto& i : st) out(i);
  close();
  return 0;
}
