#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
const long long INF = (1LL << 60LL);
class BitComb {
 private:
  long long _digits;
  long long _base;
  long long _data[512];
  long long _finished;
  long long _i;

 public:
  BitComb(long long digits, long long base) {
    _digits = digits;
    _base = base;
    _finished = false;
    _i = 0;
    fill_n(_data, 512, 0);
  }
  void next() {
    if (_finished) {
      return;
    }
    for (long long i = 0; i < _digits; i++) {
      if (_data[i] + 1 < _base) {
        _data[i] += 1;
        break;
      } else {
        _data[i] = 0;
        if (i == _digits - 1) {
          _finished = true;
          break;
        }
      }
    }
  }
  long long* data() { return _data; }
  void print() {
    for (long long i = _digits - 1; i >= 0; i--) {
      cout << _data[i];
    }
    cout << endl;
  }
  bool finished() { return _finished; }
};
int main() {
  vector<string> list;
  long long N;
  scanf("%lld", &N);
  if (N == 1) {
    cout << "a" << endl;
  }
  auto bc_h = BitComb(N - 1, 2);
  while (!bc_h.finished()) {
    string new_str = "a";
    char current = 'a';
    for (long long i = 0; i < N - 1; i++) {
      if (bc_h.data()[i]) {
        current += 1;
      }
      new_str += current;
    }
    list.emplace_back(new_str);
    bc_h.next();
  }
  for (long long i = 0; i < list.size(); i++) {
    cout << list[i] << endl;
  }
}
