#include <bits/stdc++.h>
using namespace std;
long long n;
string str;
void dfs(long long cur) {
  if (cur == n + 1) {
    cout << str << endl;
    return;
  }
  char last = str.back();
  if (last != 'a') {
    str.push_back(last - 1);
    dfs(cur + 1);
    str.pop_back();
  }
  str.push_back(last);
  dfs(cur + 1);
  str.pop_back();
  if (last != 'z') {
    str.push_back(last + 1);
    dfs(cur + 1);
    str.pop_back();
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n;
  str = "a";
  dfs(2);
  return 0;
}
