#include <bits/stdc++.h>
using namespace std;
char s[10];
int main() {
  int n;
  cin >> n;
  for (register int i = 0; i < (1 << n - 1); i++) {
    s[0] = 'a';
    for (register int j = 1; j < n; j++) {
      if (i & (1 << j - 1))
        s[j] = s[j - 1] + 1;
      else
        s[j] = 'a';
    }
    cout << s << endl;
  }
  return 0;
}
