#include <bits/stdc++.h>
using namespace std;
string ans = "aaaaaaaaaa";
string str = "abcdefghij";
vector<string> vec;
int N;
void find(int pos) {
  if (pos == N) {
    if (vec.size() > 0) {
      int count = 0;
      for (int j = 0; j < vec.size(); j++) {
        for (int k = 0; k < N; k++) {
          for (int h = k + 1; h < N; h++) {
            if ((vec[j][k] == vec[j][h] && ans[k] == ans[h]) ||
                (vec[j][k] != vec[j][h] && ans[k] != ans[h])) {
              continue;
            } else {
              count++;
              k = N;
              break;
            }
          }
        }
      }
      if (count == vec.size()) {
        for (int i = 0; i < N; i++) cout << ans[i];
        cout << "\n";
        string temp = ans.substr(0, N);
        vec.push_back(temp);
        return;
      } else {
        return;
      }
    } else {
      for (int i = 0; i < N; i++) cout << ans[i];
      cout << "\n";
      string temp = ans.substr(0, N);
      vec.push_back(temp);
    }
    return;
  }
  for (int i = 0; i < pos + 1; i++) {
    ans[pos] = str[i];
    find(pos + 1);
  }
}
int main() {
  cin >> N;
  find(0);
}
