#include <bits/stdc++.h>
using namespace std;
long long INF = 1e18;
long long mod = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  int second[11];
  second[0] = 1;
  for (int i = 1; i <= 10; i++) second[i] = second[i - 1] * 2;
  if (n == 1) {
    cout << 'a' << endl;
  } else {
    char c = 'a';
    for (int i = 0; i < (1 << n - 1); i++) {
      char now = c;
      for (int k = 0; k < n; k++) {
        cout << now;
        if (i & second[k]) now++;
      }
      cout << endl;
    }
  }
  return 0;
}
