#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> str(N, 0), last(N, 0);
  iota(begin(last), end(last), 0);
  for (; str < last; ++str[N - 1]) {
    for (int i = N - 1; i >= 0; --i) {
      if (str[i] >= str[i - 1] + 2) {
        str[i] = str[i] - (str[i - 1] + 2);
        ++str[i - 1];
      }
    }
    for (int i = 0; i < N; ++i) cout << char('a' + str[i]);
    cout << '\n';
  }
  for (int i = 0; i < N; ++i) cout << char('a' + str[i]);
  cout << '\n';
}
