#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> ans;
  for (char c1 = 'a'; c1 <= 'a' + 1; c1++) {
    string s(10, 'a');
    s[1] = c1;
    for (char c2 = 'a'; c2 <= c1 + 1; c2++) {
      s[2] = c2;
      for (char c3 = 'a'; c3 <= c2 + 1; c3++) {
        s[3] = c3;
        for (char c4 = 'a'; c4 <= c3 + 1; c4++) {
          s[4] = c4;
          for (char c5 = 'a'; c5 <= c4 + 1; c5++) {
            s[5] = c5;
            for (char c6 = 'a'; c6 <= c5 + 1; c6++) {
              s[6] = c6;
              for (char c7 = 'a'; c7 <= c6 + 1; c7++) {
                s[7] = c7;
                for (char c8 = 'a'; c8 <= c7 + 1; c8++) {
                  s[8] = c8;
                  for (char c9 = 'a'; c9 <= c8 + 1; c9++) {
                    s[9] = c9;
                    ans.push_back(s);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  int k = 1;
  for (int i = 0; i < (n); i++) k *= i + 1;
  for (int i = 0; i < (k); i++) {
    cout << ans[i].substr(10 - n, n) << endl;
  }
  return 0;
}
