#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  string s;
  for (long long i = 0; i < n; ++i) s += 'a';
  if (n == 1) cout << s << endl;
  if (n > 1)
    for (long long a = 0; a <= 1; ++a) {
      s[1] = 'a' + a;
      if (n == 2) cout << s << endl;
      if (n > 2)
        for (long long b = 0; b <= a + 1; ++b) {
          s[2] = 'a' + b;
          if (n == 3) cout << s << endl;
          if (n > 3)
            for (long long c = 0; c <= b + 1; ++c) {
              s[3] = 'a' + c;
              if (n == 4) cout << s << endl;
              if (n > 4)
                for (long long d = 0; d <= c + 1; ++d) {
                  s[4] = 'a' + d;
                  if (n == 5) cout << s << endl;
                  if (n > 5)
                    for (long long e = 0; e <= d + 1; ++e) {
                      s[5] = 'a' + e;
                      if (n == 6) cout << s << endl;
                      if (n > 6)
                        for (long long f = 0; f <= e + 1; ++f) {
                          s[6] = 'a' + f;
                          if (n == 7) cout << s << endl;
                          if (n > 7)
                            for (long long g = 0; g <= f + 1; ++g) {
                              s[7] = 'a' + g;
                              if (n == 8) cout << s << endl;
                              if (n > 8)
                                for (long long h = 0; h <= g + 1; ++h) {
                                  s[8] = 'a' + h;
                                  if (n == 9) cout << s << endl;
                                  if (n > 9)
                                    for (long long i = 0; i <= h + 1; ++i) {
                                      s[9] = 'a' + i;
                                      cout << s << endl;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
  return 0;
}
