#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll MOD = 1e9 + 7;
ll mod(ll A, ll M) { return (A % M + M) % M; }
constexpr ll INF = 1LL << 60;
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
ll divceil(ll A, ll B) { return (A + (B - 1)) / B; }
ll N;
void dfs(string s) {
  if (s.size() == N) {
    cout << s << endl;
    return;
  }
  char c1 = s.back();
  char c0 = c1 - 1;
  char c2 = c1 + 1;
  if (c1 != 'a') dfs(s + c0);
  dfs(s + c1);
  dfs(s + c2);
}
int main() {
  cin >> N;
  dfs("a");
}
