#include <bits/stdc++.h>
using namespace std;
void lia(int n, string s) {
  if (n == 1)
    cout << s << endl;
  else {
    char cur = s[s.size() - 1];
    char cur1 = cur - 1, cur2 = cur + 1;
    if (cur > 'a') lia(n - 1, s + cur1);
    lia(n - 1, s + cur);
    lia(n - 1, s + cur2);
  }
}
int main() {
  int n;
  cin >> n;
  lia(n, "a");
}
