#include <bits/stdc++.h>
using namespace std;
int n;
int a[1005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < pow(2, n - 1); i++) {
    int x = i, len = 1;
    while (x != 0) {
      a[len++] = x % 2;
      x /= 2;
    }
    int k = n - (len - 1);
    while (k--) cout << 'a';
    for (int j = len - 1; j >= 1; j--)
      if (a[j] == 0)
        cout << 'a';
      else if (a[j] == 1)
        cout << 'b';
    cout << endl;
  }
  for (int i = 'a'; i <= 'a' + n - 1; i++) {
    cout << char(i);
  }
  cout << endl;
  return 0;
}
