#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
void dfs(vector<int>& A, int M, int N) {
  if (A.size() == N) {
    for (int a : A) {
      char s = 'a' + a;
      cout << s;
    }
    cout << endl;
    return;
  }
  for (int v = 0; v < M; ++v) {
    A.push_back(v);
    dfs(A, v + 2, N);
    A.pop_back();
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> A;
  dfs(A, 1, n);
  return 0;
}
