#include <bits/stdc++.h>
using namespace std;
const int mod = (int)998244353;
float PHI = 1.6180339;
const float PI_F = 3.14159265358979f;
const long long maxn = 1e5 + 10;
long long gb[maxn];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  cout << fixed << setprecision(2);
  long long n;
  cin >> n;
  string f = "";
  vector<string> v;
  set<string> st;
  for (long long i = 0; i < n; i++) {
    f += 'a';
  }
  v.push_back(f);
  st.insert(f);
  for (long long i = 1; i < n; i++) {
    string g = "", g2 = "";
    for (long long j = 0; j < (n - i); j++) {
      g += 'a';
    }
    for (long long j = 0; j < i; j++) {
      g2 += 'b';
    }
    string fin = g + g2;
    v.push_back(fin);
  }
  sort(v.begin(), v.end());
  for (string bb : v) cout << bb << "\n";
  return 0;
}
