#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
using Graph = vector<vector<int>>;
using Edge = map<pair<int, int>, int>;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
int main() {
  int N;
  cin >> N;
  vector<vector<string>> S(10);
  S[0].push_back("a");
  for (int i = 1; i < 10; i++) {
    for (auto s : S[i - 1]) {
      S[i].push_back("a" + s);
    }
    for (auto s : S[i - 1]) {
      s[0] = 'b';
      S[i].push_back("a" + s);
    }
    if (i == 2) S[i].push_back("abc");
    if (i == 3) S[i].push_back("abcd");
    if (i == 4) S[i].push_back("abcde");
    if (i == 5) S[i].push_back("abcdef");
    if (i == 6) S[i].push_back("abcdefg");
    if (i == 7) S[i].push_back("abcdefgh");
    if (i == 8) S[i].push_back("abcdefghi");
    if (i == 9) S[i].push_back("abcdefghij");
  }
  for (auto s : S[N - 1]) {
    cout << s << endl;
  }
  return 0;
}
