#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<char> A = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'};
  vector<int> ans(N);
  for (int i = N - 1; i >= 0; i--) {
    cout << A.at(ans.at(i));
    if (i == 0) {
      cout << endl;
    }
  }
  while (ans.at(0) != N - 1) {
    ans.at(0)++;
    for (int i = 0; i < N - 2; i++) {
      if (ans.at(i) - ans.at(i + 1) == 2) {
        ans.at(i) = 0;
        ans.at(i + 1)++;
      }
    }
    for (int i = N - 1; i >= 0; i--) {
      cout << A.at(ans.at(i));
      if (i == 0) {
        cout << endl;
      }
    }
  }
}
