#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int A, B, C, D, E, F, N, M, K, L, X, Y, Z, H, W, sum = 0, num = 0,
                                                             flag = 0;
  string S, T;
  cin >> N;
  T = "abcdefghijklmnopqrstuvwxyz";
  S = "";
  for (long long int i = 0; i < 1; i++) {
    if (N == 1)
      cout << T[i] << endl;
    else
      for (long long int j = 0; j < i + 2; j++) {
        if (N == 2)
          cout << S + T[i] + T[j] << endl;
        else
          for (long long int k = 0; k < j + 2; k++) {
            if (N == 3)
              cout << S + T[i] + T[j] + T[k] << endl;
            else
              for (long long int l4 = 0; l4 < max(max(i, j), k) + 2; l4++) {
                if (N == 4)
                  cout << S + T[i] + T[j] + T[k] + T[l4] << endl;
                else
                  for (long long int l5 = 0; l5 < l4 + 2; l5++) {
                    if (N == 5)
                      cout << S + T[i] + T[j] + T[k] + T[l4] + T[l5] << endl;
                    else
                      for (long long int l6 = 0; l6 < l5 + 2; l6++) {
                        if (N == 6)
                          cout << S + T[i] + T[j] + T[k] + T[l4] + T[l5] + T[l6]
                               << endl;
                        else
                          for (long long int l7 = 0; l7 < l6 + 2; l7++) {
                            if (N == 7)
                              cout << S + T[i] + T[j] + T[k] + T[l4] + T[l5] +
                                          T[l6] + T[l7]
                                   << endl;
                            else
                              for (long long int l8 = 0; l8 < l7 + 2; l8++) {
                                if (N == 8)
                                  cout << S + T[i] + T[j] + T[k] + T[l4] +
                                              T[l5] + T[l6] + T[l7] + T[l8]
                                       << endl;
                                else
                                  for (long long int l9 = 0; l9 < l8 + 2;
                                       l9++) {
                                    if (N == 9)
                                      cout << S + T[i] + T[j] + T[k] + T[l4] +
                                                  T[l5] + T[l6] + T[l7] +
                                                  T[l8] + T[l9]
                                           << endl;
                                    else
                                      for (long long int l0 = 0; l0 < l9 + 2;
                                           l0++) {
                                        cout << S + T[i] + T[j] + T[k] + T[l4] +
                                                    T[l5] + T[l6] + T[l7] +
                                                    T[l8] + T[l9] + T[l0]
                                             << endl;
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
          }
      }
  }
}
