#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  string ans = {};
  for (int i = 0; i < (n); ++i) {
    ans.push_back('a');
  }
  string temp = ans;
  cout << ans << endl;
  for (int i = 1; i < n; i++) {
    for (int j = n - 1; j >= i; j--) {
      for (int k = j; k >= i; k--) {
        temp = ans;
        temp[k] = char('a' + i);
        cout << temp << endl;
      }
      ans[j] = char('a' + i);
    }
  }
  return 0;
}
