#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;
    for (int j = 1; j <= a.size() - 1; j++) {
      int ima = 0;
      int mae = 0;
      ima = a[j] - '0';
      mae = a[j - 1] - '0';
      if (mae + 1 < ima) {
        ok = 1;
        j = a.size();
      }
    }
    if (a.size() == 1) {
      if (a[0] - '0' <= 1) {
      } else {
        ok = 1;
      }
    }
    if (ok == 0) {
      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;
}
