#include <bits/stdc++.h>
using namespace std;
vector<char> alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                      'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                      's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
void print(vector<int> &nums) {
  for (int i = 0; i < nums.size(); i++) {
    cout << alpha.at(nums.at(i));
  }
  cout << endl;
}
void normalize(vector<int> &nums) {
  int current = nums.size() - 1;
  while (current >= 1) {
    if (nums.at(current) > nums.at(current - 1) + 1) {
      nums.at(current - 1)++;
      nums.at(current) = 0;
      current--;
    } else {
      break;
    }
  }
}
int main() {
  int N;
  cin >> N;
  if (N == 1) {
    cout << 'a' << endl;
  } else {
    vector<int> nums(N);
    int last = N - 1;
    while (1) {
      print(nums);
      nums.at(last)++;
      normalize(nums);
      if (nums.at(0) == 1) {
        break;
      }
    }
  }
  return 0;
}
