#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
using uint64 = unsigned long long;
using vi = vector<int>;
using vl = vector<int64>;
using pii = pair<int, int>;
using pll = pair<int64, int64>;
const int INF = (1 << 30) - 1;
const int64 INF64 = (1LL << 62) - 1;
template <typename T>
T gcd(T a, T b) {
  if (a < b) return gcd(b, a);
  T r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
template <typename T>
T lcm(const T a, const T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
bool chmin(T& a, const T& b) {
  if (a > b)
    return a = b, true;
  else
    return false;
}
template <typename T>
bool chmax(T& a, const T& b) {
  if (a < b)
    return a = b, true;
  else
    return false;
}
int main() {
  cout << fixed << setprecision(15);
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  if (n == 1) {
    cout << ("a") << '\n';
    return 0;
  }
  for (int bit = 0; bit < (int)(1 << (n - 1)); ++bit) {
    char c = 'a';
    cout << c;
    for (int j = n - 2; j >= 0; --j) {
      if (bit & 1 << j) ++c;
      cout << c;
    }
    cout << '\n';
  }
  return 0;
}
