#include <bits/stdc++.h>
#pragma GCC optimize(2)
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
const double PI = 3.1415926536;
using namespace std;
int n;
vector<char> v;
void dfs(int dep, char last) {
  if (dep > n) {
    for (auto i : v) cout << i;
    cout << "\n";
    return;
  }
  for (char i = 'a'; i <= 'z'; ++i) {
    if (dep == 1 && i > 'a') break;
    if (i > 'b') break;
    v.push_back(i);
    dfs(dep + 1, i);
    v.pop_back();
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> n;
  dfs(1, 'a');
  return 0;
}
