#include <bits/stdc++.h>
using namespace std;
using G = vector<vector<int>>;
using M = map<int, int>;
using P = pair<int, int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int, vector<int>, greater<int>>;
using V = vector<int>;
using ll = long long;
using edge = struct {
  int to;
  int cost;
};
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int n;
vector<string> st;
void dfs(string s = "a", char p = 'a') {
  if (s.size() == n) {
    st.push_back(s);
    return;
  }
  dfs(s + 'a', 'a');
  if (p != 'b') dfs(s + 'b', 'b');
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  dfs();
  for (int i = 0; i < st.size(); i++) cout << (st[i]) << "\n";
  return 0;
}
