#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  long long jyougenn = 0;
  int keta = 0;
  keta = n - 2;
  for (int i = 0; i <= n - 1; i++) {
    jyougenn += pow(10, (n - 2 - i)) * (i + 1);
  }
  for (int i = 0; i <= jyougenn; i++) {
    string a = to_string(i);
    int ok = 0;
    int maxa = 0;
    for (int j = 0; j <= a.size() - 1; j++) {
      int ima = 0;
      ima = a[j] - '0';
      if (maxa + 1 < ima) {
        ok = 1;
        j = a.size();
      }
      maxa = max(maxa, ima);
    }
    if (ok == 0) {
      if (n == 1) {
        cout << "a" << endl;
      } else {
        for (int j = 0; j <= n - a.size() - 1; j++) {
          cout << "a";
        }
        for (int j = 0; j <= a.size() - 1; j++) {
          int num = 0;
          num = a[j] - '0';
          char kotae;
          kotae = 'a' + num;
          cout << kotae;
        }
        cout << endl;
      }
    }
  }
  return 0;
}
