#include <bits/stdc++.h>
using namespace std;
int n;
char a[10];
void solve(int l, int index, char c) {
  if (index == l) {
    for (int i = 0; i < l; i++) {
      cout << a[i];
    }
    cout << endl;
    return;
  }
  for (int i = 0; i <= 1; i++) {
    a[index] = (char)(c + i);
    solve(l, index + 1, c + i);
  }
}
int main() {
  cin >> n;
  a[0] = 'a';
  solve(n, 1, a[0]);
}
