#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const int inf = 1001001001;
int digit_sum(int n, int a) {
  int ret = 0;
  while (n > 0) {
    ret += n % a;
    n /= a;
  }
  return ret;
}
int fac(int n) {
  if (n == 0) return 1;
  int ret = 1;
  for (int i = 0; i < n; ++i) ret *= 10;
  return ret;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < n + 1; ++i) {
    for (int j = fac(i - 1); j < fac(i); ++j) {
      if (digit_sum(j, 10) != n) continue;
      string s = to_string(j);
      bool flag = true;
      for (int k = 0; k < s.size(); ++k)
        if (s[k] == '0') flag = false;
      if (!flag) continue;
      char c = 'a';
      int nj = j;
      while (nj > 0) {
        int k = nj % 10;
        for (int x = 0; x < k; ++x) cout << c;
        c += 1;
        nj /= 10;
      }
      cout << endl;
    }
  }
}
