#include <bits/stdc++.h>
using namespace std;
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 <typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
const long long INF = 1LL << 60;
const long long MOD = 1e9 + 7;
long long N;
void dfs(vector<char> vec, char c) {
  if (vec.size() == N) {
    for (long long i = 0; i < N; i++) {
      if (i == N - 1)
        cout << vec.at(i) << endl;
      else
        cout << vec.at(i);
    }
    return;
  }
  vec.push_back(c);
  for (long long i = -1; i <= 1; i++) {
    if (c == 'a' && i == -1) continue;
    c += i;
    dfs(vec, c);
  }
}
int main() {
  char c = 'a';
  vector<char> vec;
  long long N;
  cin >> N;
  dfs(vec, c);
}
