#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int MAXN = 3e5 + 5;
long long a, b, c;
int cnt[10];
bool nxt(string &s) {
  for (int i = s.size() - 1; i > 0; i--) {
    if (cnt[s[i] - 'a'] == 1) continue;
    cnt[s[i] - 'a']--;
    s[i] = (char)(s[i] + 1);
    cnt[s[i] - 'a']++;
    for (int j = i + 1; j < s.size(); j++) {
      cnt[s[j] - 'a']--;
      s[j] = 'a';
      cnt[0]++;
    }
    return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int N;
  cin >> N;
  string s;
  for (int i = 0; i < N; i++) s += 'a';
  cnt[0] = 4;
  cout << s << '\n';
  while (nxt(s)) cout << s << '\n';
}
