#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return 0;
}
template <typename T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return 0;
}
void dfs(int N, string now) {
  if ((int)now.size() == N) {
    cout << now << endl;
    return;
  }
  for (auto& c : now) {
    dfs(N, now + c);
  }
  for (int i = (int)0; i < (int)26; ++i) {
    bool not_exist = true;
    for (auto& c : now) {
      if (c == (char)(i + 'a')) {
        not_exist = false;
        break;
      }
    }
    if (not_exist) {
      dfs(N, now + (char)(i + 'a'));
      break;
    }
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  dfs(N, "");
  return 0;
}
