#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> C = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"};
  int N;
  cin >> N;
  if (N == 1) cout << C.at(0) << endl;
  if (N == 2) {
    for (int i = 0; i < 2; i++) {
      cout << C.at(0) + C.at(i) << endl;
    }
  }
  if (N == 3) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        cout << C.at(0) + C.at(i) + C.at(j) << endl;
      }
    }
  }
  if (N == 4) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        for (int k = 0; k < 2 + j; k++) {
          cout << C.at(0) + C.at(i) + C.at(j) + C.at(k) << endl;
        }
      }
    }
  }
  if (N == 5) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        for (int k = 0; k < 2 + j; k++) {
          for (int l = 0; l < 2 + k; l++) {
            cout << C.at(0) + C.at(i) + C.at(j) + C.at(k) + C.at(l) << endl;
          }
        }
      }
    }
  }
  if (N == 6) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        for (int k = 0; k < 2 + j; k++) {
          for (int l = 0; l < 2 + k; l++) {
            for (int m = 0; m < 2 + l; m++) {
              cout << C.at(0) + C.at(i) + C.at(j) + C.at(k) + C.at(l) + C.at(m)
                   << endl;
            }
          }
        }
      }
    }
  }
  if (N == 7) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        for (int k = 0; k < 2 + j; k++) {
          for (int l = 0; l < 2 + k; l++) {
            for (int m = 0; m < 2 + l; m++) {
              for (int n = 0; n < 2 + m; n++) {
                cout << C.at(0) + C.at(i) + C.at(j) + C.at(k) + C.at(l) +
                            C.at(m) + C.at(n)
                     << endl;
              }
            }
          }
        }
      }
    }
  }
  if (N == 8) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        for (int k = 0; k < 2 + j; k++) {
          for (int l = 0; l < 2 + k; l++) {
            for (int m = 0; m < 2 + l; m++) {
              for (int n = 0; n < 2 + m; n++) {
                for (int o = 0; o < 2 + n; o++) {
                  cout << C.at(0) + C.at(i) + C.at(j) + C.at(k) + C.at(l) +
                              C.at(m) + C.at(n) + C.at(o)
                       << endl;
                }
              }
            }
          }
        }
      }
    }
  }
  if (N == 9) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        for (int k = 0; k < 2 + j; k++) {
          for (int l = 0; l < 2 + k; l++) {
            for (int m = 0; m < 2 + l; m++) {
              for (int n = 0; n < 2 + m; n++) {
                for (int o = 0; o < 2 + n; o++) {
                  for (int p = 0; p < 2 + o; p++) {
                    cout << C.at(0) + C.at(i) + C.at(j) + C.at(k) + C.at(l) +
                                C.at(m) + C.at(n) + C.at(o) + C.at(p)
                         << endl;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (N == 10) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2 + i; j++) {
        for (int k = 0; k < 2 + j; k++) {
          for (int l = 0; l < 2 + k; l++) {
            for (int m = 0; m < 2 + l; m++) {
              for (int n = 0; n < 2 + m; n++) {
                for (int o = 0; o < 2 + n; o++) {
                  for (int p = 0; p < 2 + o; p++) {
                    for (int q = 0; q < p + 2; q++) {
                      cout << C.at(0) + C.at(i) + C.at(j) + C.at(k) + C.at(l) +
                                  C.at(m) + C.at(n) + C.at(o) + C.at(p) +
                                  C.at(q)
                           << endl;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
