#include <bits/stdc++.h>
using namespace std;
int main() {
  int lnth;
  cin >> lnth;
  int cntlnth = 0;
  string bas = "abcdefghij";
  string st = "aaaaaaaaaa";
  for (int a = 0; a <= 0; a++) {
    st[cntlnth] = bas[a];
    if (cntlnth == lnth - 1) cout << st.substr(0, lnth) << endl;
    for (int b = 0; cntlnth + 1 < lnth && b <= a + 1; b++) {
      st[cntlnth + 1] = bas[b];
      if (cntlnth + 1 == lnth - 1) cout << st.substr(0, lnth) << endl;
      for (int c = 0; cntlnth + 2 < lnth && c <= b + 1; c++) {
        st[cntlnth + 2] = bas[c];
        if (cntlnth + 2 == lnth - 1) cout << st.substr(0, lnth) << endl;
        for (int d = 0; cntlnth + 3 < lnth && d <= c + 1; d++) {
          st[cntlnth + 3] = bas[d];
          if (cntlnth + 3 == lnth - 1) cout << st.substr(0, lnth) << endl;
          for (int e = 0; cntlnth + 4 < lnth && e <= d + 1; e++) {
            st[cntlnth + 4] = bas[e];
            if (cntlnth + 4 == lnth - 1) cout << st.substr(0, lnth) << endl;
            for (int f = 0; cntlnth + 5 < lnth && f <= e + 1; f++) {
              st[cntlnth + 5] = bas[f];
              if (cntlnth + 5 == lnth - 1) cout << st.substr(0, lnth) << endl;
              for (int g = 0; cntlnth + 6 < lnth && g <= f + 1; g++) {
                st[cntlnth + 6] = bas[e];
                if (cntlnth + 6 == lnth - 1) cout << st.substr(0, lnth) << endl;
                for (int h = 0; cntlnth + 7 < lnth && h <= g + 1; h++) {
                  st[cntlnth + 7] = bas[h];
                  if (cntlnth + 7 == lnth - 1)
                    cout << st.substr(0, lnth) << endl;
                  for (int i = 0; cntlnth + 8 < lnth && i <= h + 1; i++) {
                    st[cntlnth + 8] = bas[i];
                    if (cntlnth + 8 == lnth - 1)
                      cout << st.substr(0, lnth) << endl;
                    for (int j = 0; cntlnth + 9 < lnth && j <= i + 1; j++) {
                      st[cntlnth + 9] = bas[e];
                      if (cntlnth + 9 == lnth - 1)
                        cout << st.substr(0, lnth) << endl;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return 0;
}
