#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long double eps = 1.0e-10;
int main() {
  int n;
  cin >> n;
  int count = 1;
  string s;
  for (int(i) = 0; (i) < (n); (i)++) {
    s.push_back('a');
  }
  cout << s << endl;
  char m = 'b';
  while (count <= n) {
    for (int(i) = 0; (i) < (n - count); (i)++) {
      char x = s[i + count];
      s[i + count] = m;
      cout << s << endl;
      s[i + count] = x;
    }
    count++;
    s[count] = m;
    m++;
  }
}
