#include <bits/stdc++.h>
int main() {
  long N;
  std::cin >> N;
  long m = std::pow(2, N - 1);
  for (long i = 0; i < m; ++i) {
    std::stringstream ss;
    ss << std::bitset<10>(i);
    auto s = ss.str().substr(10 - N, 10);
    for (char c : s) {
      std::cout << (char)(c + 'a' - '0');
    }
    std::cout << std::endl;
  }
  return 0;
}
