#include <bits/stdc++.h>
using namespace std;
const unsigned long long l = 1000000007;
const int MAX_ = 2000;
int T;
void print(string res, int i) { printf("Case #%d: %s\n", T - i, res.c_str()); }
void print(long long res, int i) { printf("Case #%d: %lld\n", T - i, res); }
string x = "abcdefghijklmnopqrstuvwxyz";
void get(string &s, int i, int k) {
  if (i >= s.size()) {
    cout << s << endl;
    return;
  }
  for (int j = 0; j <= k; j++) {
    s[i] = x[j];
    get(s, i + 1, j + 1);
  }
}
void solve(int t) {
  int n;
  cin >> n;
  string s(n, 'a');
  get(s, 0, 0);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t, testCases;
  testCases = 1;
  while (testCases--) {
    t = 1;
    T = t;
    while (t--) {
      solve(t);
    }
  }
  return 0;
}
