#include <bits/stdc++.h>
using namespace std;
bool compPair(const pair<int, int>& arg1, const pair<int, int>& arg2) {
  return arg1.first > arg2.first;
}
int pow(int a, int b) {
  int ans = 1;
  if (b <= 0)
    return 1;
  else {
    for (int i = 0; i < b; i++) {
      ans *= a;
    }
  }
  return ans;
}
int print(int a) {
  string ss;
  int now = a % 10, before = a % 10;
  while (a > 0) {
    now = a % 10;
    ss.insert(ss.begin(), now + 96);
    a = a / 10;
    if (abs(now - before) >= 2)
      return 0;
    else
      before = now;
  }
  cout << ss << endl;
}
int main(void) {
  int n;
  cin >> n;
  priority_queue<int, vector<int>, greater<int>> PQ;
  int now;
  PQ.push(1);
  for (int i = 0; i < n; i++) {
    if (n == 1) {
      cout << 'a' << endl;
      return 0;
    }
    while (PQ.top() < 1 * pow(10, i) && i != 0) {
      now = PQ.top();
      PQ.pop();
      for (int j = 0; j < (i + 1); j++) {
        PQ.push(now * 10 + (j + 1));
      }
    }
  }
  while (!PQ.empty()) {
    now = PQ.top();
    PQ.pop();
    print(now);
  }
  return 0;
}
