#include <bits/stdc++.h>
using namespace std;
int n;
set<string> v;
void dfs(string s, char a) {
  s += a;
  if (s.size() == n) {
    cout << s << "\n";
    return;
  }
  for (__typeof(s[s.size() - 1] + 2) i = (97) - ((97) > (s[s.size() - 1] + 2));
       i != (s[s.size() - 1] + 2) - ((97) > (s[s.size() - 1] + 2));
       i += 1 - 2 * ((97) > (s[s.size() - 1] + 2)))
    dfs(s, i);
}
int main() {
  cin >> n;
  dfs("", 'a');
  return 0;
}
