#include <bits/stdc++.h>
using namespace std;
template <typename X>
bool exist(vector<X> vec, X item) {
  return find(vec.begin(), vec.end(), item) != vec.end();
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long power(long long x, long long n) {
  if (n == 0) return 1;
  return (n % 2) ? x * power(x, n - 1) % 1000000007
                 : power(x * x % 1000000007, n / 2);
}
long long dx[] = {0, 0, -1, 1};
long long dy[] = {1, -1, 0, 0};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long K;
  cin >> K;
  string ans = "";
  for (long long i = (long long)0; i < (long long)K; i++) {
    ans += "a";
  }
  cout << ans << endl;
  long long idx = 0;
  while (idx < (K - 1)) {
    string tmp = ans;
    for (int i = tmp.size() - 1 - idx; i < tmp.size(); i++) {
      while (tmp[i] != (tmp[i - 1] + 1)) {
        tmp[i]++;
        cout << tmp << endl;
      }
    }
    idx++;
  }
  return 0;
}
