#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T = ll>
using v = vector<T>;
template <typename T = ll>
using vv = v<v<ll>>;
template <typename T = ll, typename U = ll>
using p = pair<T, U>;
template <typename T>
T chmin(T &a, T b) {
  return a = min(a, b);
}
template <typename T>
T chmax(T &a, T b) {
  return a = max(a, b);
}
const ll INF = (ll)1e9;
const ll MOD = (ll)1e9 + 7;
void a();
class b {
  ll h, w;

 public:
  b() {
    cin >> h >> w;
    ll ans1 = (w + 1) / 2;
    ll ans2 = w / 2;
    ans1 = (h + 1) / 2 * ans1;
    ans2 = h / 2 * ans2;
    cout << ans1 + ans2;
  }
};
void c() {
  ll a, b, c;
  cin >> a >> b >> c;
  if ((c - a - b) > 0 && (4 * a * b) < ((c - a - b) * (c - a - b))) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
class d {
  ll n;
  void dfs(string s) {
    if (s.size() == n) {
      cout << s << endl;
      return;
    }
    for (char c = 'a'; c < 'a' + 10; c++) {
      if (c <= 'a' + s.size() && s.back() <= c) dfs(s + c);
    }
  }

 public:
  d() {
    cin >> n;
    dfs("");
  }
};
int main() {
  d();
  return 0;
}
void a() {
  ll k;
  cin >> k;
  v<> s = {1, 1, 1, 2, 1, 2, 1, 5,  2, 2, 1, 5, 1, 2, 1, 14,
           1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
  cout << s[k - 1];
  return;
}
