#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
void pass(int rest, string s) {
  if (rest == 0)
    cout << s << endl;
  else
    for (char x = 'a'; x <= 'c'; ++x) {
      if (s.back() + 1 < x) continue;
      pass(rest - 1, s + x);
    }
}
int main() {
  int n;
  cin >> n;
  pass(n, "");
  return 0;
}
