#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<string> words;
  string az = "bcdefghijklmnopqrstuvwxyz";
  for (int i = 0; i < (1 << (N - 1)); i++) {
    bitset<10> bits(i);
    int x = 0;
    string word = "a";
    for (int j = 0; j < N - 1; j++) {
      if (!bits.test(j)) {
        word += "a";
      } else {
        word += az.at(x);
        x++;
      }
    }
    words.push_back(word);
  }
  for (int i = 0; i < words.size(); i++) {
    for (int j = i + 1; j < words.size(); j++) {
      words.at(i) = min(words.at(i), words.at(j));
    }
  }
  for (int i = 0; i < words.size(); i++) {
    cout << words.at(i) << endl;
  }
}
