#include <bits/stdc++.h>
using namespace std;
long long n, a[15];
void dfs(long long dep, long long num) {
  if (dep >= n) {
    for (long long i = 0; i < n; i++) cout << (char)(a[i] + 'a' - 1);
    cout << '\n';
    return;
  }
  for (long long i = num; i <= num + 1; i++) {
    a[dep] = i;
    dfs(dep + 1, i);
    a[dep] = 0;
  }
}
int main() {
  cin >> n;
  a[0] = 1;
  dfs(1, 1);
  return 0;
}
