#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  queue<pair<int, int> > prev;
  for (int i = 1; i <= N; i++) {
    if (i == 1) {
      prev.push(pair<int, int>(1, 1));
      continue;
    }
    queue<pair<int, int> > que;
    while (!prev.empty()) {
      pair<int, int> p = prev.front();
      prev.pop();
      for (int j = 1; j <= p.second + 1; j++) {
        if (p.second < j) {
          que.push(pair<int, int>(p.first * 10 + j, j));
        } else {
          que.push(pair<int, int>(p.first * 10 + j, p.second));
        }
      }
    }
    while (!que.empty()) {
      pair<int, int> p = que.front();
      que.pop();
      prev.push(p);
    }
  }
  while (!prev.empty()) {
    pair<int, int> p = prev.front();
    prev.pop();
    string ans = to_string(p.first);
    for (int i = 0; i < ans.length(); i++) {
      if (ans[i] == '1') cout << "a";
      if (ans[i] == '2') cout << "b";
      if (ans[i] == '3') cout << "c";
      if (ans[i] == '4') cout << "d";
      if (ans[i] == '5') cout << "e";
      if (ans[i] == '6') cout << "f";
      if (ans[i] == '7') cout << "g";
      if (ans[i] == '8') cout << "h";
      if (ans[i] == '9') cout << "i";
      if (ans[i] == '10') cout << "j";
      if (ans[i] == '11') cout << "k";
    }
    cout << endl;
  }
  return 0;
}
