#include <bits/stdc++.h>
using namespace std;
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;
}
void dfs(long long N, string s) {
  if (s.length() == N) {
    cout << s << endl;
  } else {
    if (s[s.length() - 1] != 'a') dfs(N, s + "a");
    dfs(N, s + s[s.length() - 1]);
    if (s[s.length() - 1] != 'z') dfs(N, s + (char)(s[s.length() - 1] + 1));
  }
}
int main() {
  long long N;
  cin >> N;
  dfs(N, "a");
  return 0;
}
