#include <bits/stdc++.h>
using namespace std;
long long int use[20];
long long int n;
void func(string s, long long int now, char before) {
  if (now == n) {
    cout << s << endl;
    return;
  }
  func(s + 'a', now + 1, 'a');
  func(s + (char)(before + 1), now + 1, (char)(before + 1));
}
signed main() {
  cin >> n;
  string s = "a";
  func(s, 1, 'a');
  return 0;
}
