#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void coY() { cout << "Yes" << endl; }
void coN() { cout << "No" << endl; }
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const ll INF = 1LL << 60;
int main() {
  int n;
  cin >> n;
  vector<int> mozi(n, 0);
  for (auto x : mozi) {
    char c = 'a' + x;
    cout << c;
  }
  cout << endl;
  while (1) {
    bool fuck = 1;
    for (int i = n - 1; i > 0; i--) {
      if (mozi[i] == mozi[i - 1]) {
        fuck = 0;
        mozi[i] += 1;
        for (auto x : mozi) {
          char c = 'a' + x;
          cout << c;
        }
        cout << endl;
        break;
      }
    }
    if (fuck) break;
  }
}
