#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 1e4;
const int MOD = 998244353;
const double EPS = 1e-6;
const double PI = acos(-1);
vector<string> res;
void solve() {
  for (int a = 1; a <= 10; a++) {
    for (int b = 1; b <= 10 - a; b++) {
      for (int c = 1; c <= 10 - a - b; c++) {
        for (int d = 1; d <= 10 - a - b - c; d++) {
          for (int e = 1; e <= 10 - a - b - c - d; e++) {
            for (int f = 1; f <= 10 - a - b - c - d - e; f++) {
              for (int g = 1; g <= 10 - a - b - c - d - e - f; g++) {
                for (int h = 1; h <= 10 - a - b - c - d - e - f - g; h++) {
                  for (int i = 1; i <= 10 - a - b - c - d - e - f - g - h;
                       i++) {
                    for (int j = 1; j <= 10 - a - b - c - d - e - f - g - h - i;
                         j++) {
                      string s = string('a', a) + string('b', b) +
                                 string('c', c) + string('d', d) +
                                 string('e', e) + string('f', f) +
                                 string('g', g) + string('h', h) +
                                 string('i', i) + string('j', j);
                      sort(s.begin(), s.end());
                      do {
                        res.push_back(s);
                        sort(s.begin(), s.end());
                      } while (next_permutation(s.begin(), s.end()));
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  solve();
  sort(res.begin(), res.end());
  for (string x : res) cout << x << endl;
}
