#include <bits/stdc++.h>
static const long long int MAX = 1000000000000000;
static const int NIL = -1;
using namespace std;
const long double EPS = 0.0000000001;
const long double PI = (acos(-1));
const long long int MOD = 1e9 + 7;
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
long long int n;
vector<string> ans;
void solve(int sum, string str) {
  if (sum == n) {
    string tmp;
    for (int i = 0; i < (int)(str.size()); i++) {
      for (int j = 0; j < (int)((int)(str[i] - '0')); j++)
        tmp += (char)('a' + i);
    }
    ans.push_back(tmp);
  } else {
    for (int i = 1; i <= 10; i++) {
      if (sum + i <= 10) {
        solve(sum + i, str + (char)(i + '0'));
      }
    }
  }
}
int main() {
  cin >> n;
  solve(0, "");
  sort(ans.begin(), ans.end());
  for (int i = 0; i < (int)(ans.size()); i++) cout << ans[i] << endl;
}
