#include <bits/stdc++.h>
using namespace std;
int n;
bool flag;
string ans;
void dfs(string s) {
  if (s.length() == n && flag) {
    if (s == ans) flag = false;
    cout << s << endl;
    return;
  }
  for (int i = 0; i < n; i++) {
    string temp = s;
    s += 'a' + i;
    dfs(s);
    s = temp;
  }
}
string s;
int main() {
  while (~scanf("%d", &n)) {
    flag = true;
    ans = "";
    s = "";
    for (int i = 0; i < n; i++) ans += 'a' + i;
    dfs(s);
  }
  return 0;
}
