#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "a\n";
  } else if (n == 2) {
    cout << "aa\nab\n";
  } else if (n == 3) {
    cout << "aaa\naab\naba\nabb\nabc\n";
  } else {
    cout << "0\n";
  }
  return 0;
}
