#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;
const ll INF = 999999999999999;
ll n;
void dfs(string s, char c) {
  s.push_back(c);
  if (s.size() == n) {
    cout << s << endl;
    return;
  }
  dfs(s, c);
  if (c + 1 <= 'z') dfs(s, c + 1);
}
int main() {
  cin >> n;
  dfs("", 'a');
  return 0;
}
