#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int check = 0;
  for (int i = 0; i < pow(10, N - 2) + 3 * pow(10, N - 3); i++) {
    check = 0;
    int m = 0;
    for (int j = 0; j < (int)(N - 1); j++) {
      int b = pow(10, N - 2 - j);
      int c = pow(10, N - 1 - j);
      if ((i / b - 10 * (i / c)) > m + 1) {
        check = 1;
        break;
      } else {
        if (m < (i / b - 10 * (i / c))) {
          m++;
        }
      }
    }
    if (check == 0) {
      cout << 'a';
      for (int j = 0; j < (int)(N - 1); j++) {
        int b = pow(10, N - 2 - j);
        int c = pow(10, N - 1 - j);
        char e = 'a' + i / b - 10 * (i / c);
        cout << e;
      }
      cout << endl;
    }
  }
}
