#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
long long mod(long long a, long long b) { return (b + (a % b)) % b; }
long long addMod(long long a, long long b) { return ((a % M) + (b % M)) % M; }
long long addMod(long long a, long long b, long long m) {
  return ((a % m) + (b % m)) % m;
}
long long mulMod(long long a, long long b) { return ((a % M) * (b % M)) % M; }
long long mulMod(long long a, long long b, long long m) {
  return ((a % m) * (b % m)) % m;
}
long long subMod(long long a, long long b) {
  return mod((mod(a, M) - mod(b, M)), M);
}
long long subMod(long long a, long long b, long long m) {
  return mod((mod(a, m) - mod(b, m)), m);
}
long long dayofweek(long long d, long long m, long long y) {
  static long long t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
  y -= m < 3;
  return (y + y / 4 - y / 100 + y / 400 + t[m - 1] + d) % 7;
}
long long gcdExtended(long long a, long long b, long long* x, long long* y);
long long modInverse(long long b, long long m) {
  long long x, y;
  long long g = gcdExtended(b, m, &x, &y);
  if (g != 1) return -1;
  return (x % m + m) % m;
}
long long modDivide(long long a, long long b, long long m) {
  a = a % m;
  long long inv = modInverse(b, m);
  return (inv * a) % m;
}
long long gcdExtended(long long a, long long b, long long* x, long long* y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long powerMod(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = powerMod(x, y / 2);
  if (y % 2 == 0)
    return mulMod(temp, temp);
  else
    return mulMod(x, mulMod(temp, temp));
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long Logn(long long n, long long r) {
  return (n > r - 1) ? 1 + Logn(n / r, r) : 0;
}
long long power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
void test() {}
bool AlmostEqualRelative(long double A, long double B) {
  long double diff = abs(A - B);
  A = abs(A);
  B = abs(B);
  long double largest = (B > A) ? B : A;
  const long double maxRelDiff = std::numeric_limits<long double>::epsilon();
  if (diff <= largest * maxRelDiff) return true;
  return false;
}
set<string> Set;
unordered_set<string> Set2;
void attempt(long long n, string s, long long i) {
  if (i == n) {
    string temp;
    for (long long a = 0; a < n - 1; a++) {
      for (long long b = a + 1; b < n; b++) {
        if (s[a] == s[b]) {
          temp += '=';
        } else {
          temp += '#';
        }
      }
    }
    if (Set2.insert(temp).second == true) {
      Set.insert(s);
    }
  } else {
    for (long long j = 0; j <= i; j++) {
      char c = static_cast<char>(j + 'a');
      attempt(n, s + c, i + 1);
    }
  }
}
void solve() {
  long long n;
  cin >> n;
  string s;
  attempt(n, s, 0);
  for (auto it = Set.begin(); it != Set.end(); it++) {
    cout << (*it) << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
