#include <bits/stdc++.h>
using namespace std;
using cd = complex<double>;
const int Inf = 100000;
const int mod = 1000000007;
const double Pi = acos(-1);
void Fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int n;
char s[25];
void back(int pos) {
  if (pos == n + 1) {
    for (int i = 1; i <= n; i++) {
      cout << s[i];
    }
    cout << endl;
    return;
  }
  s[pos] = s[pos - 1];
  back(pos + 1);
  s[pos] = s[pos - 1] + 1;
  back(pos + 1);
}
void Solve() {
  cin >> n;
  s[1] = 'a';
  back(2);
}
signed main() { Solve(); }
