#include <bits/stdc++.h>
using namespace std;
int len;
set<string> normal;
int factorial(int n) {
  if (n > 1) {
    return n * factorial(n - 1);
  }
  return 1;
}
void procreate(string seq) {
  string final = "";
  for (int i = 0; i < len; i++) {
    final += 'a';
  }
  int counter = 0;
  for (int i = 0; i < len; i++) {
    for (int j = i + 1; j < len; j++) {
      if (seq[counter] == '1' && final[i] == final[j]) {
        final[j]++;
      }
      counter++;
    }
  }
  normal.insert(final);
}
void create(int n, string seq = "") {
  if (seq.size() != n) {
    create(n, seq + '0');
    create(n, seq + '1');
  } else {
    procreate(seq);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> len;
  create(factorial(len) / (factorial(len - 2) * factorial(2)));
  for (string x : normal) {
    cout << x << endl;
  }
}
