#include <bits/stdc++.h>
using namespace std;
inline int ctoi(char c) {
  if (c < '0' || '9' < c) throw invalid_argument("ctoi error");
  return c - '0';
}
template <typename T>
inline T gcd(T x, T y) {
  if (x <= 0 || y <= 0) throw invalid_argument("gcd error: x <= 0 or y <= 0");
  if (x < y) swap(x, y);
  T r = x % y;
  while (r != 0) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
template <typename T>
inline T lcm(T x, T y) {
  if (x <= 0 || y <= 0) throw invalid_argument("lcm error: x <= 0 or y <= 0");
  return x * y / gcd(x, y);
}
bool normal(vector<int> a, vector<int> b) {
  if (a.size() != b.size()) return false;
  for (int i = 0; i < (int)(a.size() - 1); i++) {
    for (int j = (int)(i + 1); j < (int)(a.size()); j++) {
      if (a[i] == a[j] && b[i] != b[j])
        return true;
      else if (a[i] != a[j] && b[i] == b[j])
        return true;
    }
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  vector<vector<int>> vec(pow(n, n), vector<int>(n, 0));
  vector<vector<int>> ans;
  for (int i = 0; i < (int)(pow(n, n)); i++) {
    int num = i;
    for (int j = 0; j < (int)(n); j++) {
      vec[i][n - j - 1] = num % n;
      num /= n;
    }
  }
  ans.push_back(vec[0]);
  for (int i = (int)(1); i < (int)(pow(n, n)); i++) {
    vector<int> v = vec[i];
    bool flg = true;
    for (int j = 0; j < (int)(ans.size()); j++) {
      if (!normal(v, ans[j])) {
        flg = false;
        break;
      }
    }
    if (flg) ans.push_back(v);
  }
  for (int i = 0; i < (int)(ans.size()); i++) {
    for (int j = 0; j < (int)(n); j++) {
      cout << (char)('a' + ans[i][j]);
    }
    cout << endl;
  }
  return 0;
}
