#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int in() {
  int x;
  cin >> x;
  return x;
}
long long lin() {
  long long x;
  cin >> x;
  return x;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline void print(pair<T, T> p) {
  cout << "(" << p.first << "," << p.second << ") ";
}
template <typename T>
istream& operator>>(istream& is, vector<T>& vec) {
  for (T& x : vec) is >> x;
  return is;
}
const long long INF = 1e9 + 7;
int main() {
  long long n;
  cin >> n;
  char c[10] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'};
  vector<string> ans;
  for (long long i = 0; i < (1 << n); i++) {
    long long pos = 0;
    string s = "";
    s += c[pos];
    for (long long j = n - 2; j >= 0; j--) {
      if ((i & (1 << j))) {
        pos++;
        s += c[pos];
      } else {
        s += c[pos];
      }
    }
    ans.push_back(s);
  }
  sort(ans.begin(), ans.end());
  long long m = ans.size();
  for (long long i = 0; i < m; i += 2) {
    cout << ans[i] << endl;
  }
  return 0;
}
