#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const int INF = 1e9 + 7;
const long long LINF = 1LL << 60;
int main() {
  int n;
  cin >> n;
  vector<char> a(n);
  for (int(i) = (0); (i) < (n); ++i) {
    a[i] = 'a' + i;
  }
  int b = 1;
  for (int(i) = (0); (i) < (n); ++i) {
    b *= i + 1;
  }
  for (int(i) = (0); (i) < (b); ++i) {
    for (int(j) = (0); (j) < (n); ++j) {
      cout << a[i % (j + 1)];
    }
    cout << endl;
  }
  return 0;
}
